diff options
Diffstat (limited to 'src/qt/test/apptests.cpp')
-rw-r--r-- | src/qt/test/apptests.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/test/apptests.cpp b/src/qt/test/apptests.cpp index 0b5c341548..8dffd2f59f 100644 --- a/src/qt/test/apptests.cpp +++ b/src/qt/test/apptests.cpp @@ -84,8 +84,11 @@ void AppTests::appTests() // Reset global state to avoid interfering with later tests. LogInstance().DisconnectTestLogger(); AbortShutdown(); - UnloadBlockIndex(/* mempool */ nullptr); - WITH_LOCK(::cs_main, g_chainman.Reset()); + { + LOCK(cs_main); + UnloadBlockIndex(/* mempool */ nullptr, g_chainman); + g_chainman.Reset(); + } } //! Entry point for BitcoinGUI tests. |