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. // 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
} }
} }