Skip to content

Commit 64e4963

Browse files
committed
[mempool] always assert coin spent
This is an extremely cheap function (just checks that the coin CTxOut isn't null) that doesn't need to be gated on check_ratio.
1 parent bb9078e commit 64e4963

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/txmempool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ void CTxMemPool::removeForReorg(CChainState& active_chainstate, int flags)
660660
if (it2 != mapTx.end())
661661
continue;
662662
const Coin &coin = active_chainstate.CoinsTip().AccessCoin(txin.prevout);
663-
if (m_check_ratio != 0) assert(!coin.IsSpent());
663+
assert(!coin.IsSpent());
664664
unsigned int nMemPoolHeight = active_chainstate.m_chain.Tip()->nHeight + 1;
665665
if (coin.IsSpent() || (coin.IsCoinBase() && ((signed long)nMemPoolHeight) - coin.nHeight < COINBASE_MATURITY)) {
666666
should_remove = true;

0 commit comments

Comments
 (0)