From c8cdfcffd084fd1ec2240b133c25cf247f9fb861 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 15 Jul 2021 12:59:23 -0700 Subject: [PATCH] Randomize the order of addr processing (cherry picked from commit bitcoin/bitcoin@5648138f5949013331c017c740646e2f4013bc24) --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 1561a5bc1..1fd96aca7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,7 @@ #include "wallet/asyncrpcoperation_shieldcoinbase.h" #include "warnings.h" +#include #include #include #include @@ -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();