diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-07 11:34:55 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-07 11:34:55 -0700 |
commit | 3ecabae36364e905e7821fba3e60aa7f8418de6c (patch) | |
tree | 04b22d1cf440fcedacdea019f6421c629d766b44 /src/test/merkle_tests.cpp | |
parent | efee1db21a652019e0ab18fffc233d91bb7f1816 (diff) |
Replace more rand() % NUM by randranges
Diffstat (limited to 'src/test/merkle_tests.cpp')
-rw-r--r-- | src/test/merkle_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/merkle_tests.cpp b/src/test/merkle_tests.cpp index 785864520d..3108da8596 100644 --- a/src/test/merkle_tests.cpp +++ b/src/test/merkle_tests.cpp @@ -120,7 +120,7 @@ BOOST_AUTO_TEST_CASE(merkle_test) // If ntx <= 16, try all branches. Otherwise, try 16 random ones. int mtx = loop; if (ntx > 16) { - mtx = insecure_rand() % ntx; + mtx = insecure_randrange(ntx); } std::vector<uint256> newBranch = BlockMerkleBranch(block, mtx); std::vector<uint256> oldBranch = BlockGetMerkleBranch(block, merkleTree, mtx); |