mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
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.
This commit is contained in:
parent
b04b4c27ea
commit
e54fb96d80
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user