If ExistsTx fails try looking up the tx, it may be fully spent.
This commit is contained in:
parent
80981b4696
commit
b406ca7ae7
1 changed files with 6 additions and 3 deletions
|
@ -184,9 +184,12 @@ func testExistsTxSha(tc *testContext) bool {
|
|||
// The transaction must exist in the database.
|
||||
txHash := tx.Sha()
|
||||
if exists := tc.db.ExistsTxSha(txHash); !exists {
|
||||
_, err := tc.db.FetchTxBySha(txHash)
|
||||
if err != nil {
|
||||
tc.t.Errorf("ExistsTxSha (%s): block #%d (%s) "+
|
||||
"tx #%d (%s) does not exist", tc.dbType,
|
||||
tc.blockHeight, tc.blockHash, i, txHash)
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue