diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-02-25 12:16:58 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-03-29 11:26:08 -0700 |
commit | 4fd2d2fc97e21efceab849576e544160fd5e3e3d (patch) | |
tree | 4d36745b0b5a72bf51b2e54bfd13151920a2c57b /src/net.h | |
parent | 16329224e70d0525208f6b0ba00c5e1531a4f5ea (diff) |
Add a FastRandomContext::randrange and use it
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -760,7 +760,7 @@ public: // after addresses were pushed. if (_addr.IsValid() && !addrKnown.contains(_addr.GetKey())) { if (vAddrToSend.size() >= MAX_ADDR_TO_SEND) { - vAddrToSend[insecure_rand.rand32() % vAddrToSend.size()] = _addr; + vAddrToSend[insecure_rand.randrange(vAddrToSend.size())] = _addr; } else { vAddrToSend.push_back(_addr); } |