From 1f94bb0c744a103b633c1051e8fbc01e612097dc Mon Sep 17 00:00:00 2001 From: Amiti Uttarwar Date: Tue, 28 Apr 2020 14:40:05 -0700 Subject: [PATCH] [doc] Provide rationale for randomization in scheduling. --- src/net_processing.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index d0e345c30e..e0eb092f1d 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -825,7 +825,8 @@ void PeerLogicValidation::ReattemptInitialBroadcast(CScheduler& scheduler) const } } - // schedule next run for 10-15 minutes in the future + // Schedule next run for 10-15 minutes in the future. + // We add randomness on every cycle to avoid the possibility of P2P fingerprinting. const std::chrono::milliseconds delta = std::chrono::minutes{10} + GetRandMillis(std::chrono::minutes{5}); scheduler.scheduleFromNow([&] { ReattemptInitialBroadcast(scheduler); }, delta); }