mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-03 20:35:17 +02:00
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-
This commit is contained in:
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(getlocator_test)
|
||||
|
||||
// Test 100 random starting points for locators.
|
||||
for (int n=0; n<100; n++) {
|
||||
int r = insecure_rand() % 150000;
|
||||
int r = insecure_randrange(150000);
|
||||
CBlockIndex* tip = (r < 100000) ? &vBlocksMain[r] : &vBlocksSide[r - 100000];
|
||||
CBlockLocator locator = chain.GetLocator(tip);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user