From efee1db21a652019e0ab18fffc233d91bb7f1816 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Tue, 23 May 2017 15:28:45 -0700 Subject: scripted-diff: use insecure_rand256/randrange more -BEGIN VERIFY SCRIPT- sed -i "s/\ it(const_cast(&dbw)->NewIterator()); @@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate) // Set up a non-obfuscated wrapper to write some initial data. CDBWrapper* dbw = new CDBWrapper(ph, (1 << 10), false, false, false); char key = 'k'; - uint256 in = GetRandHash(); + uint256 in = insecure_rand256(); uint256 res; BOOST_CHECK(dbw->Write(key, in)); @@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate) BOOST_CHECK(!odbw.IsEmpty()); // There should be existing data BOOST_CHECK(is_null_key(dbwrapper_private::GetObfuscateKey(odbw))); // The key should be an empty string - uint256 in2 = GetRandHash(); + uint256 in2 = insecure_rand256(); uint256 res3; // Check that we can write successfully @@ -174,7 +174,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex) // Set up a non-obfuscated wrapper to write some initial data. CDBWrapper* dbw = new CDBWrapper(ph, (1 << 10), false, false, false); char key = 'k'; - uint256 in = GetRandHash(); + uint256 in = insecure_rand256(); uint256 res; BOOST_CHECK(dbw->Write(key, in)); @@ -193,7 +193,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex) BOOST_CHECK(!odbw.Read(key, res2)); BOOST_CHECK(!is_null_key(dbwrapper_private::GetObfuscateKey(odbw))); - uint256 in2 = GetRandHash(); + uint256 in2 = insecure_rand256(); uint256 res3; // Check that we can write successfully -- cgit v1.2.3