aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2021-09-29 20:55:07 +0100
committerglozow <gloriajzhao@gmail.com>2021-11-30 12:21:56 +0000
commit64e4963c635ec3a73a5fa3f32f6ec08e70609f60 (patch)
treee4a0c29bd3fcafa8f17baf44c2d21ee5fdaedbb9 /src/txmempool.cpp
parentbb9078ed51159fa162484f16993313ed6cf980e3 (diff)
downloadbitcoin-64e4963c635ec3a73a5fa3f32f6ec08e70609f60.tar.xz
[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.
Diffstat (limited to 'src/txmempool.cpp')
-rw-r--r--src/txmempool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 088a560e15..43b15be83d 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;