diff options
| author | Pieter Wuille <[email protected]> | 2017-05-23 15:28:45 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-06-05 12:45:44 -0700 |
| commit | efee1db21a652019e0ab18fffc233d91bb7f1816 (patch) | |
| tree | 32b2fc3ecb73daa71075df246975fb5e2dae7590 /src/test/miner_tests.cpp | |
| parent | Add various insecure_rand wrappers for tests (diff) | |
| download | discoin-efee1db21a652019e0ab18fffc233d91bb7f1816.tar.xz discoin-efee1db21a652019e0ab18fffc233d91bb7f1816.zip | |
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/miner_tests.cpp')
| -rw-r--r-- | src/test/miner_tests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index a40060e65..02bc93003 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -372,7 +372,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) while (chainActive.Tip()->nHeight < 209999) { CBlockIndex* prev = chainActive.Tip(); CBlockIndex* next = new CBlockIndex(); - next->phashBlock = new uint256(GetRandHash()); + next->phashBlock = new uint256(insecure_rand256()); pcoinsTip->SetBestBlock(next->GetBlockHash()); next->pprev = prev; next->nHeight = prev->nHeight + 1; @@ -384,7 +384,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) while (chainActive.Tip()->nHeight < 210000) { CBlockIndex* prev = chainActive.Tip(); CBlockIndex* next = new CBlockIndex(); - next->phashBlock = new uint256(GetRandHash()); + next->phashBlock = new uint256(insecure_rand256()); pcoinsTip->SetBestBlock(next->GetBlockHash()); next->pprev = prev; next->nHeight = prev->nHeight + 1; |