From f8995807e4f08fd0266899e3e227903f06da6ab1 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 17 Jun 2019 19:13:30 +0200 Subject: [PATCH] tests: Make coins_tests/updatecoins_simulation_test deterministic --- src/test/coins_tests.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp index d03defb335..2c42596edc 100644 --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -278,6 +278,7 @@ UtxoData::iterator FindRandomFrom(const std::set &utxoSet) { BOOST_AUTO_TEST_CASE(updatecoins_simulation_test) { SeedInsecureRand(/* deterministic */ true); + g_mock_deterministic_tests = true; bool spent_a_duplicate_coinbase = false; // A simple map to track what we expect the cache stack to represent. @@ -472,6 +473,8 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test) // Verify coverage. BOOST_CHECK(spent_a_duplicate_coinbase); + + g_mock_deterministic_tests = false; } BOOST_AUTO_TEST_CASE(ccoins_serialization)