If ExistsTx fails try looking up the tx, it may be fully spent.

This commit is contained in:
Dale Rahn 2013-10-28 23:01:52 -04:00
parent 80981b4696
commit b406ca7ae7

View file

@ -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
}
}