[NOD-442] Make dbFetchTxAcceptingBlock return nil if accepting bucket doesn't exist for transaction (#487)

This commit is contained in:
Ori Newman 2019-11-26 10:54:15 +02:00 committed by stasatdaglabs
parent b5f8a0452e
commit 6e4b18a498

View File

@ -371,11 +371,7 @@ func dbFetchTxAcceptingBlock(dbTx database.Tx, txID *daghash.TxID, dag *blockdag
bucket := dbTx.Metadata().Bucket(acceptingBlocksIndexKey).Bucket(txID[:])
if bucket == nil {
return nil, database.Error{
ErrorCode: database.ErrCorruption,
Description: fmt.Sprintf("No accepting blocks bucket "+
"exists for %s", txID),
}
return nil, nil
}
cursor := bucket.Cursor()
if !cursor.First() {