mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
[refactor] use exists() instead of mapTx.find()
This commit is contained in:
@ -362,9 +362,7 @@ void Chainstate::MaybeUpdateMempoolForReorg(
|
|||||||
// If the transaction spends any coinbase outputs, it must be mature.
|
// If the transaction spends any coinbase outputs, it must be mature.
|
||||||
if (it->GetSpendsCoinbase()) {
|
if (it->GetSpendsCoinbase()) {
|
||||||
for (const CTxIn& txin : tx.vin) {
|
for (const CTxIn& txin : tx.vin) {
|
||||||
auto it2 = m_mempool->mapTx.find(txin.prevout.hash);
|
if (m_mempool->exists(GenTxid::Txid(txin.prevout.hash))) continue;
|
||||||
if (it2 != m_mempool->mapTx.end())
|
|
||||||
continue;
|
|
||||||
const Coin& coin{CoinsTip().AccessCoin(txin.prevout)};
|
const Coin& coin{CoinsTip().AccessCoin(txin.prevout)};
|
||||||
assert(!coin.IsSpent());
|
assert(!coin.IsSpent());
|
||||||
const auto mempool_spend_height{m_chain.Tip()->nHeight + 1};
|
const auto mempool_spend_height{m_chain.Tip()->nHeight + 1};
|
||||||
|
Reference in New Issue
Block a user