From e54fb96d80973e99d8f60cb403ea1bcd08dab918 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 2 Oct 2013 10:26:44 -0500 Subject: [PATCH] Test tx lookup validity in CheckInputTransactions. This commit modifies CheckInputTransactions to ensure that not only must a transaction exist in the transaction store, it must also not have any errors associated with it or be nil. --- validate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate.go b/validate.go index ebe563263..b1e9a354d 100644 --- a/validate.go +++ b/validate.go @@ -604,7 +604,7 @@ func CheckTransactionInputs(tx *btcwire.MsgTx, txHeight int64, txStore TxStore) // Ensure the input is available. txInHash := &txIn.PreviousOutpoint.Hash originTx, exists := txStore[*txInHash] - if !exists { + if !exists || originTx.Err != nil || originTx.Tx == nil { str := fmt.Sprintf("unable to find input transaction "+ "%v for transaction %v", txInHash, txHash) return 0, RuleError(str)