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.
|
// The transaction must exist in the database.
|
||||||
txHash := tx.Sha()
|
txHash := tx.Sha()
|
||||||
if exists := tc.db.ExistsTxSha(txHash); !exists {
|
if exists := tc.db.ExistsTxSha(txHash); !exists {
|
||||||
tc.t.Errorf("ExistsTxSha (%s): block #%d (%s) "+
|
_, err := tc.db.FetchTxBySha(txHash)
|
||||||
"tx #%d (%s) does not exist", tc.dbType,
|
if err != nil {
|
||||||
tc.blockHeight, tc.blockHash, i, txHash)
|
tc.t.Errorf("ExistsTxSha (%s): block #%d (%s) "+
|
||||||
|
"tx #%d (%s) does not exist", tc.dbType,
|
||||||
|
tc.blockHeight, tc.blockHash, i, txHash)
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue