Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit f899580

Browse files
tests: Make coins_tests/updatecoins_simulation_test deterministic
1 parent 91958d6 commit f899580

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/coins_tests.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ UtxoData::iterator FindRandomFrom(const std::set<COutPoint> &utxoSet) {
278278
BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
279279
{
280280
SeedInsecureRand(/* deterministic */ true);
281+
g_mock_deterministic_tests = true;
281282

282283
bool spent_a_duplicate_coinbase = false;
283284
// A simple map to track what we expect the cache stack to represent.
@@ -472,6 +473,8 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
472473

473474
// Verify coverage.
474475
BOOST_CHECK(spent_a_duplicate_coinbase);
476+
477+
g_mock_deterministic_tests = false;
475478
}
476479

477480
BOOST_AUTO_TEST_CASE(ccoins_serialization)

0 commit comments

Comments
 (0)