Skip to content

Commit

Permalink
remove unnecessary mutex acquisition in notfound loop
Browse files Browse the repository at this point in the history
Previously, we accessed m_txdownloadman within the loop. Now, we are
just checking and making copies of a local variable.
  • Loading branch information
glozow committed Sep 5, 2024
1 parent b394265 commit ad7c570
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4871,7 +4871,6 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
vRecv >> vInv;
std::vector<uint256> tx_invs;
if (vInv.size() <= node::MAX_PEER_TX_ANNOUNCEMENTS + MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
LOCK(m_tx_download_mutex);
for (CInv &inv : vInv) {
if (inv.IsGenTxMsg()) {
// If we receive a NOTFOUND message for a tx we requested, mark the announcement for it as
Expand Down

0 comments on commit ad7c570

Please sign in to comment.