Skip to content

Commit 9e7f8f6

Browse files
author
MarcoFalke
committed
Merge #15327: tests: Make test updatecoins_simulation_test deterministic
ef0b012 tests: Make updatecoins_simulation_test deterministic (practicalswift) Pull request description: Make test `updatecoins_simulation_test` deterministic. Can be verified using `contrib/test_deterministic_coverage.sh` introduced in #15296. Related: * #15296: "tests: Add script checking for deterministic line coverage in unit tests" * #15324: "test: Make bloom tests deterministic" * #14343: "coverage reports non-deterministic" Tree-SHA512: 3466e28a42dd3735effb8542044d88e8350a470729d4a4f02abce9d6367de6568d698131469ba154d3dc76d448bacb360b7aefd066bb5b91408c0be375dd3ecb
2 parents 9b63c43 + ef0b012 commit 9e7f8f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/coins_tests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ UtxoData::iterator FindRandomFrom(const std::set<COutPoint> &utxoSet) {
279279
// has the expected effect (the other duplicate is overwritten at all cache levels)
280280
BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
281281
{
282+
SeedInsecureRand(/* deterministic */ true);
283+
282284
bool spent_a_duplicate_coinbase = false;
283285
// A simple map to track what we expect the cache stack to represent.
284286
std::map<COutPoint, Coin> result;

0 commit comments

Comments
 (0)