diff options
author | Pieter Wuille <pieter@wuille.net> | 2023-02-01 18:52:11 -0500 |
---|---|---|
committer | Pieter Wuille <pieter@wuille.net> | 2023-02-02 09:00:15 -0500 |
commit | 59e6828bb5b56a2354a80059d3f660f551f3e207 (patch) | |
tree | f4b1749cca23c900c3d7d69b5615ae0afa8e2673 /src/test | |
parent | b0ff31084006ac7d4a7afba3190ca75f5f8441af (diff) |
Add deterministic mode to CCoinsViewCache
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/coins_view.cpp | 2 | ||||
-rw-r--r-- | src/test/fuzz/coinscache_sim.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/fuzz/coins_view.cpp b/src/test/fuzz/coins_view.cpp index e75dc3ce91..e80c772aa4 100644 --- a/src/test/fuzz/coins_view.cpp +++ b/src/test/fuzz/coins_view.cpp @@ -46,7 +46,7 @@ FUZZ_TARGET_INIT(coins_view, initialize_coins_view) { FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()}; CCoinsView backend_coins_view; - CCoinsViewCache coins_view_cache{&backend_coins_view}; + CCoinsViewCache coins_view_cache{&backend_coins_view, /*deterministic=*/true}; COutPoint random_out_point; Coin random_coin; CMutableTransaction random_mutable_transaction; diff --git a/src/test/fuzz/coinscache_sim.cpp b/src/test/fuzz/coinscache_sim.cpp index b794888ca2..02575f2731 100644 --- a/src/test/fuzz/coinscache_sim.cpp +++ b/src/test/fuzz/coinscache_sim.cpp @@ -245,7 +245,7 @@ FUZZ_TARGET(coinscache_sim) ++current_height; // Make sure there is always at least one CCoinsViewCache. if (caches.empty()) { - caches.emplace_back(new CCoinsViewCache(&bottom)); + caches.emplace_back(new CCoinsViewCache(&bottom, /*deterministic=*/true)); sim_caches[caches.size()].Wipe(); } @@ -374,7 +374,7 @@ FUZZ_TARGET(coinscache_sim) [&]() { // Add a cache level (if not already at the max). if (caches.size() != MAX_CACHES) { // Apply to real caches. - caches.emplace_back(new CCoinsViewCache(&*caches.back())); + caches.emplace_back(new CCoinsViewCache(&*caches.back(), /*deterministic=*/true)); // Apply to simulation data. sim_caches[caches.size()].Wipe(); } |