From 7cd40f9d2c1077a86cd5a73ad0d0a448d934c445 Mon Sep 17 00:00:00 2001 From: glozow Date: Wed, 30 Aug 2023 15:53:56 +0100 Subject: [PATCH] [refactor] use exists() instead of mapTx.find() --- src/validation.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index 1ebf4b8b3b5968..68830c0dca369a 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -359,9 +359,7 @@ void Chainstate::MaybeUpdateMempoolForReorg( // If the transaction spends any coinbase outputs, it must be mature. if (it->GetSpendsCoinbase()) { for (const CTxIn& txin : tx.vin) { - auto it2 = m_mempool->mapTx.find(txin.prevout.hash); - if (it2 != m_mempool->mapTx.end()) - continue; + if (m_mempool->exists(GenTxid::Txid(txin.prevout.hash))) continue; const Coin& coin{CoinsTip().AccessCoin(txin.prevout)}; assert(!coin.IsSpent()); const auto mempool_spend_height{m_chain.Tip()->nHeight + 1};