Skip to content

Commit

Permalink
Update net_processing.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
koh-gt authored Apr 25, 2024
1 parent f0fd590 commit 5b535a6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4522,9 +4522,7 @@ bool PeerManager::SendMessages(CNode* pto)
// especially since we have many peers and some will draw much shorter delays.
unsigned int nRelayedTransactions = 0;
LOCK(pto->m_tx_relay->cs_filter);
size_t broadcast_max{INVENTORY_BROADCAST_MAX + (pto->m_tx_relay->setInventoryTxToSend.size()/1000)*5};
broadcast_max = std::min<size_t>(1000, broadcast_max);
while (!vInvTx.empty() && nRelayedTransactions < broadcast_max) {
while (!vInvTx.empty() && nRelayedTransactions < INVENTORY_BROADCAST_MAX) {
// Fetch the top element from the heap
std::pop_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
std::set<uint256>::iterator it = vInvTx.back();
Expand Down

0 comments on commit 5b535a6

Please sign in to comment.