Skip to content

Commit 6f49548

Browse files
committed
[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.
1 parent fa0b5d6 commit 6f49548

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/net_processing.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,8 +2123,6 @@ void PeerManagerImpl::BlockConnected(
21232123
if (ptx->HasWitness()) {
21242124
m_recent_confirmed_transactions.insert(ptx->GetWitnessHash().ToUint256());
21252125
}
2126-
}
2127-
for (const auto& ptx : pblock->vtx) {
21282126
m_txrequest.ForgetTxHash(ptx->GetHash());
21292127
m_txrequest.ForgetTxHash(ptx->GetWitnessHash());
21302128
}

0 commit comments

Comments
 (0)