diff options
| author | Carl Dong <[email protected]> | 2020-08-25 15:23:57 -0400 |
|---|---|---|
| committer | Carl Dong <[email protected]> | 2020-09-15 14:11:34 -0400 |
| commit | 74f73c783d46b012f375d819e2cd09c792820cd5 (patch) | |
| tree | 9c351abe4519267e6c57ce65b195b819e2ca3e2e /src/qt | |
| parent | validation: Move ~CMainCleanup logic to ~BlockManager (diff) | |
| download | discoin-74f73c783d46b012f375d819e2cd09c792820cd5.tar.xz discoin-74f73c783d46b012f375d819e2cd09c792820cd5.zip | |
validation: Pass in chainman to UnloadBlockIndex
Diffstat (limited to 'src/qt')
| -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 0b5c34154..8dffd2f59 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. |