diff options
| author | Amiti Uttarwar <[email protected]> | 2020-04-28 14:40:05 -0700 |
|---|---|---|
| committer | Amiti Uttarwar <[email protected]> | 2020-05-25 11:27:07 -0700 |
| commit | 1f94bb0c744a103b633c1051e8fbc01e612097dc (patch) | |
| tree | 005999c11dc507fcd9f7b7f7e7e5859fcbbb8653 /src/net_processing.cpp | |
| parent | [mempool] Don't throw expected error message when upgrading (diff) | |
| download | discoin-1f94bb0c744a103b633c1051e8fbc01e612097dc.tar.xz discoin-1f94bb0c744a103b633c1051e8fbc01e612097dc.zip | |
[doc] Provide rationale for randomization in scheduling.
Diffstat (limited to 'src/net_processing.cpp')
| -rw-r--r-- | src/net_processing.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index d0e345c30..e0eb092f1 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); } |