Randomize the order of addr processing

(cherry picked from commit bitcoin/bitcoin@5648138f59)
This commit is contained in:
Pieter Wuille 2021-07-15 12:59:23 -07:00 committed by Kris Nuttycombe
parent 7c739e2b20
commit c8cdfcffd0
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@
#include "wallet/asyncrpcoperation_shieldcoinbase.h"
#include "warnings.h"
#include <algorithm>
#include <atomic>
#include <sstream>
#include <variant>
@ -6671,6 +6672,7 @@ bool static ProcessMessage(const CChainParams& chainparams, CNode* pfrom, string
}
pfrom->m_addr_token_timestamp = current_time;
std::shuffle(vAddr.begin(), vAddr.end(), ZcashRandomEngine());
for (CAddress& addr : vAddr)
{
boost::this_thread::interruption_point();