mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Replace rand() & ((1 << N) - 1) with randbits(N)
This commit is contained in:
@@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
|
||||
std::vector<bool> vMatch(nTx, false);
|
||||
std::vector<uint256> vMatchTxid1;
|
||||
for (unsigned int j=0; j<nTx; j++) {
|
||||
bool fInclude = (insecure_rand() & ((1 << (att/2)) - 1)) == 0;
|
||||
bool fInclude = insecure_randbits(att / 2) == 0;
|
||||
vMatch[j] = fInclude;
|
||||
if (fInclude)
|
||||
vMatchTxid1.push_back(vTxid[j]);
|
||||
|
||||
Reference in New Issue
Block a user