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/pow_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/pow_tests.cpp')
-rw-r--r-- | src/test/pow_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/pow_tests.cpp b/src/test/pow_tests.cpp index 3b79f8000d..d3c8a521d8 100644 --- a/src/test/pow_tests.cpp +++ b/src/test/pow_tests.cpp @@ -74,9 +74,9 @@ BOOST_AUTO_TEST_CASE(GetBlockProofEquivalentTime_test) } for (int j = 0; j < 1000; j++) { - CBlockIndex *p1 = &blocks[GetRand(10000)]; - CBlockIndex *p2 = &blocks[GetRand(10000)]; - CBlockIndex *p3 = &blocks[GetRand(10000)]; + CBlockIndex *p1 = &blocks[insecure_randrange(10000)]; + CBlockIndex *p2 = &blocks[insecure_randrange(10000)]; + CBlockIndex *p3 = &blocks[insecure_randrange(10000)]; int64_t tdiff = GetBlockProofEquivalentTime(*p1, *p2, *p3, chainParams->GetConsensus()); BOOST_CHECK_EQUAL(tdiff, p1->GetBlockTime() - p2->GetBlockTime()); |