aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/validation_chainstatemanager_tests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/validation_chainstatemanager_tests.cpp b/src/test/validation_chainstatemanager_tests.cpp
index 688aafdd46..edc7e4b70a 100644
--- a/src/test/validation_chainstatemanager_tests.cpp
+++ b/src/test/validation_chainstatemanager_tests.cpp
@@ -367,10 +367,13 @@ struct SnapshotTestSetup : TestChain100Setup {
BOOST_TEST_MESSAGE("Simulating node restart");
{
- LOCK(::cs_main);
for (Chainstate* cs : chainman.GetAll()) {
+ LOCK(::cs_main);
cs->ForceFlushStateToDisk();
}
+ // Process all callbacks referring to the old manager before wiping it.
+ SyncWithValidationInterfaceQueue();
+ LOCK(::cs_main);
chainman.ResetChainstates();
BOOST_CHECK_EQUAL(chainman.GetAll().size(), 0);
const ChainstateManager::Options chainman_opts{