From 3ecabae36364e905e7821fba3e60aa7f8418de6c Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Wed, 7 Jun 2017 11:34:55 -0700 Subject: Replace more rand() % NUM by randranges --- src/test/merkle_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/merkle_tests.cpp') 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 newBranch = BlockMerkleBranch(block, mtx); std::vector oldBranch = BlockGetMerkleBranch(block, merkleTree, mtx); -- cgit v1.2.3