mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
Replace more rand() % NUM by randranges
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user