validation: Pass in chainman to UnloadBlockIndex

This commit is contained in:
Carl Dong committed 2020-09-15 14:11:34 -04:00
1 parent 4668ded6d6
commit 74f73c783d
5 files changed
+10 -7

No files matched your search

+5 -2
View File
@@ -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.