mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-26 08:51:55 +02:00
[refactor] use exists() instead of mapTx.find()
This commit is contained in:
parent
14804699e5
commit
9cd8cafb77
@ -362,9 +362,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};
|
||||
|
Loading…
x
Reference in New Issue
Block a user