Mempool tx processing to handle DBError

Fixes #74
This commit is contained in:
Neil Booth 2016-12-15 16:56:37 +09:00
parent 5c80b96d0f
commit 49714a45e6

View File

@ -242,10 +242,11 @@ class MemPool(util.LoggedClass):
elif not mempool_missing: elif not mempool_missing:
prev_hash = hex_str_to_hash(prev_hex_hash) prev_hash = hex_str_to_hash(prev_hex_hash)
txin_pairs.append(db_utxo_lookup(prev_hash, prev_idx)) txin_pairs.append(db_utxo_lookup(prev_hash, prev_idx))
except self.db.MissingUTXOError: except (self.db.MissingUTXOError, self.db.DBError):
# This typically happens just after the daemon has # DBError can happen when flushing a newly processed
# accepted a new block and the new mempool has deps on # block. MissingUTXOError typically happens just
# new txs in that block. # after the daemon has accepted a new block and the
# new mempool has deps on new txs in that block.
continue continue
if mempool_missing: if mempool_missing: