diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2018-10-31 13:56:19 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2018-12-12 14:22:12 -0800 |
commit | 9695f31d7544778853aa373f0aeed629fa68d85e (patch) | |
tree | 4999c234883bf8127716904b36d2873383151317 /src/addrman.h | |
parent | 6d0a14703e288d72ff19d4d89defbc853233899f (diff) |
Make addrman use its local RNG exclusively
Diffstat (limited to 'src/addrman.h')
-rw-r--r-- | src/addrman.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/addrman.h b/src/addrman.h index b97feb6f08..af5a1d3b23 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -266,9 +266,6 @@ protected: //! Return a random to-be-evicted tried table address. CAddrInfo SelectTriedCollision_() EXCLUSIVE_LOCKS_REQUIRED(cs); - //! Wraps GetRandInt to allow tests to override RandomInt and make it determinismistic. - virtual int RandomInt(int nMax); - #ifdef DEBUG_ADDRMAN //! Perform consistency check. Returns an error code or zero. int Check_() EXCLUSIVE_LOCKS_REQUIRED(cs); @@ -473,7 +470,7 @@ public: { LOCK(cs); std::vector<int>().swap(vRandom); - nKey = GetRandHash(); + nKey = insecure_rand.rand256(); for (size_t bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) { for (size_t entry = 0; entry < ADDRMAN_BUCKET_SIZE; entry++) { vvNew[bucket][entry] = -1; |