mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
[refactor] combine block vtx loops in BlockConnected
Now that m_txrequest and m_recent_confirmed_transactions are guarded by the same mutex, there is no benefit to processing them separately. Instead, just loop through pblock->vtx once.
This commit is contained in:
parent
fa0b5d6882
commit
6f49548670
@ -2123,8 +2123,6 @@ void PeerManagerImpl::BlockConnected(
|
||||
if (ptx->HasWitness()) {
|
||||
m_recent_confirmed_transactions.insert(ptx->GetWitnessHash().ToUint256());
|
||||
}
|
||||
}
|
||||
for (const auto& ptx : pblock->vtx) {
|
||||
m_txrequest.ForgetTxHash(ptx->GetHash());
|
||||
m_txrequest.ForgetTxHash(ptx->GetWitnessHash());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user