aboutsummaryrefslogtreecommitdiff
path: root/src/test/pmt_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-05-23 15:28:45 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-06-05 12:45:44 -0700
commitefee1db21a652019e0ab18fffc233d91bb7f1816 (patch)
tree32b2fc3ecb73daa71075df246975fb5e2dae7590 /src/test/pmt_tests.cpp
parent1119927df03c94f9306e4d92f55d147b900522fb (diff)
scripted-diff: use insecure_rand256/randrange more
-BEGIN VERIFY SCRIPT- sed -i "s/\<GetRandHash(/insecure_rand256(/" src/test/*_tests.cpp sed -i "s/\<GetRand(/insecure_randrange(/" src/test/*_tests.cpp src/test/test_bitcoin.cpp sed -i 's/\<insecure_rand() % \([0-9]\+\)/insecure_randrange(\1)/g' src/test/*_tests.cpp -END VERIFY SCRIPT-
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 e3a4f90aaf..3572505af3 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -22,7 +22,7 @@ public:
// flip one bit in one of the hashes - this should break the authentication
void Damage() {
unsigned int n = insecure_rand() % vHash.size();
- int bit = insecure_rand() % 256;
+ int bit = insecure_randrange(256);
*(vHash[n].begin() + (bit>>3)) ^= 1<<(bit&7);
}
};