diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-05-23 15:28:45 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-05 12:45:44 -0700 |
commit | efee1db21a652019e0ab18fffc233d91bb7f1816 (patch) | |
tree | 32b2fc3ecb73daa71075df246975fb5e2dae7590 /src/test/merkle_tests.cpp | |
parent | 1119927df03c94f9306e4d92f55d147b900522fb (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/merkle_tests.cpp')
-rw-r--r-- | src/test/merkle_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/merkle_tests.cpp b/src/test/merkle_tests.cpp index a86c4fa48d..785864520d 100644 --- a/src/test/merkle_tests.cpp +++ b/src/test/merkle_tests.cpp @@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE(merkle_test) { for (int i = 0; i < 32; i++) { // Try 32 block sizes: all sizes from 0 to 16 inclusive, and then 15 random sizes. - int ntx = (i <= 16) ? i : 17 + (insecure_rand() % 4000); + int ntx = (i <= 16) ? i : 17 + (insecure_randrange(4000)); // Try up to 3 mutations. for (int mutate = 0; mutate <= 3; mutate++) { int duplicate1 = mutate >= 1 ? 1 << ctz(ntx) : 0; // The last how many transactions to duplicate first. |