Replace more rand() % NUM by randranges

This commit is contained in:
Pieter Wuille
2017-06-07 11:34:55 -07:00
parent efee1db21a
commit 3ecabae363
7 changed files with 19 additions and 19 deletions

View File

@@ -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);