tests: Make coins_tests/updatecoins_simulation_test deterministic

This commit is contained in:
practicalswift 2019-06-17 19:13:30 +02:00
parent 91958d66cb
commit f8995807e4

View file

@ -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.
@ -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)