Randomize the order of addr processing

Github-Pull: #22387
Rebased-From: 5648138f59
This commit is contained in:
Pieter Wuille 2021-07-15 12:59:23 -07:00
parent 83dfe6c65e
commit 8df3e5bd84

View file

@ -2619,6 +2619,7 @@ void PeerManager::ProcessMessage(CNode& pfrom, const std::string& msg_type, CDat
peer->m_addr_token_timestamp = current_time;
const bool rate_limited = !pfrom.HasPermission(NetPermissionFlags::PF_ADDR);
Shuffle(vAddr.begin(), vAddr.end(), FastRandomContext());
for (CAddress& addr : vAddr)
{
if (interruptMsgProc)