aboutsummaryrefslogtreecommitdiff
path: root/src/test/pmt_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-06-07 11:34:58 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-06-07 11:35:13 -0700
commit5f0b04eedc5bbdb9319c9f1f1a6c599337f5bbe3 (patch)
tree793fc19101574c742e5066481014a9f4738d08bb /src/test/pmt_tests.cpp
parent3ecabae36364e905e7821fba3e60aa7f8418de6c (diff)
Replace rand() & ((1 << N) - 1) with randbits(N)
Diffstat (limited to 'src/test/pmt_tests.cpp')
-rw-r--r--src/test/pmt_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp
index d07a9f3959..32086ead5e 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -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]);