diff --git a/src/validation.cpp b/src/validation.cpp index a02c1e4b54..ed480eaad3 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -408,10 +408,10 @@ void CChainState::MaybeUpdateMempoolForReorg( auto it2 = m_mempool->mapTx.find(txin.prevout.hash); if (it2 != m_mempool->mapTx.end()) continue; - const Coin &coin = CoinsTip().AccessCoin(txin.prevout); + const Coin& coin{CoinsTip().AccessCoin(txin.prevout)}; assert(!coin.IsSpent()); const auto mempool_spend_height{m_chain.Tip()->nHeight + 1}; - if (coin.IsSpent() || (coin.IsCoinBase() && mempool_spend_height - coin.nHeight < COINBASE_MATURITY)) { + if (coin.IsCoinBase() && mempool_spend_height - coin.nHeight < COINBASE_MATURITY) { return true; } }