aboutsummaryrefslogtreecommitdiff
path: root/src/test/pmt_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-06-07 11:34:55 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-06-07 11:34:55 -0700
commit3ecabae36364e905e7821fba3e60aa7f8418de6c (patch)
tree04b22d1cf440fcedacdea019f6421c629d766b44 /src/test/pmt_tests.cpp
parentefee1db21a652019e0ab18fffc233d91bb7f1816 (diff)
downloadbitcoin-3ecabae36364e905e7821fba3e60aa7f8418de6c.tar.xz
Replace more rand() % NUM by randranges
Diffstat (limited to 'src/test/pmt_tests.cpp')
-rw-r--r--src/test/pmt_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp
index 3572505af3..d07a9f3959 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -21,7 +21,7 @@ class CPartialMerkleTreeTester : public CPartialMerkleTree
public:
// flip one bit in one of the hashes - this should break the authentication
void Damage() {
- unsigned int n = insecure_rand() % vHash.size();
+ unsigned int n = insecure_randrange(vHash.size());
int bit = insecure_randrange(256);
*(vHash[n].begin() + (bit>>3)) ^= 1<<(bit&7);
}