aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-02-25 12:16:58 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2017-03-29 11:26:08 -0700
commit4fd2d2fc97e21efceab849576e544160fd5e3e3d (patch)
tree4d36745b0b5a72bf51b2e54bfd13151920a2c57b /src/net.h
parent16329224e70d0525208f6b0ba00c5e1531a4f5ea (diff)
downloadbitcoin-4fd2d2fc97e21efceab849576e544160fd5e3e3d.tar.xz
Add a FastRandomContext::randrange and use it
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.h b/src/net.h
index 3bbe386173..c5360f9b58 100644
--- a/src/net.h
+++ b/src/net.h
@@ -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);
}