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

Commit

Permalink
tests: Make coins_tests/updatecoins_simulation_test deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed Jun 17, 2019
1 parent 91958d6 commit f899580
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/test/coins_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ UtxoData::iterator FindRandomFrom(const std::set<COutPoint> &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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f899580

Please sign in to comment.