From 64e4963c635ec3a73a5fa3f32f6ec08e70609f60 Mon Sep 17 00:00:00 2001 From: glozow Date: Wed, 29 Sep 2021 20:55:07 +0100 Subject: [PATCH] [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. --- src/txmempool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/txmempool.cpp b/src/txmempool.cpp index 088a560e151..43b15be83de 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -660,7 +660,7 @@ void CTxMemPool::removeForReorg(CChainState& active_chainstate, int flags) if (it2 != mapTx.end()) continue; const Coin &coin = active_chainstate.CoinsTip().AccessCoin(txin.prevout); - if (m_check_ratio != 0) assert(!coin.IsSpent()); + assert(!coin.IsSpent()); unsigned int nMemPoolHeight = active_chainstate.m_chain.Tip()->nHeight + 1; if (coin.IsSpent() || (coin.IsCoinBase() && ((signed long)nMemPoolHeight) - coin.nHeight < COINBASE_MATURITY)) { should_remove = true;