From 95fea6420c92fb90c145ddd087def415731634a3 Mon Sep 17 00:00:00 2001 From: Calvin Kim Date: Mon, 13 Jul 2020 23:24:40 +0900 Subject: [PATCH] blockchain: Remove unnecessary tx hash --- blockchain/validate.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blockchain/validate.go b/blockchain/validate.go index b971337f..f41d54e6 100644 --- a/blockchain/validate.go +++ b/blockchain/validate.go @@ -877,7 +877,6 @@ func CheckTransactionInputs(tx *btcutil.Tx, txHeight int32, utxoView *UtxoViewpo return 0, nil } - txHash := tx.Hash() var totalSatoshiIn int64 for txInIndex, txIn := range tx.MsgTx().TxIn { // Ensure the referenced input transaction is available. @@ -954,7 +953,7 @@ func CheckTransactionInputs(tx *btcutil.Tx, txHeight int32, utxoView *UtxoViewpo if totalSatoshiIn < totalSatoshiOut { str := fmt.Sprintf("total value of all transaction inputs for "+ "transaction %v is %v which is less than the amount "+ - "spent of %v", txHash, totalSatoshiIn, totalSatoshiOut) + "spent of %v", tx.Hash(), totalSatoshiIn, totalSatoshiOut) return 0, ruleError(ErrSpendTooHigh, str) }