From fab262174b96854d2df5bee7da578990c9e9cb1e Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 5 Jan 2022 16:23:55 +0100 Subject: Move blockstorage-related unload to BlockManager::Unload This is a refactor and safe to do because: * UnloadBlockIndex calls ChainstateManager::Unload, which calls BlockManager::Unload * Only unit tests call Unload directly --- src/node/blockstorage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/node') diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index 3cc53e27e2..a040f2e7b4 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -348,6 +348,11 @@ void BlockManager::Unload() } m_block_index.clear(); + + vinfoBlockFile.clear(); + nLastBlockFile = 0; + setDirtyBlockIndex.clear(); + setDirtyFileInfo.clear(); } bool BlockManager::WriteBlockIndexDB() -- cgit v1.2.3