diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-01-05 16:23:55 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-01-05 16:15:04 +0100 |
commit | fab262174b96854d2df5bee7da578990c9e9cb1e (patch) | |
tree | 475886d4eeed03785c333733a6b625365d15e095 /src/node | |
parent | fa467f3913918701c765f9bc754203b4591b894f (diff) |
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
Diffstat (limited to 'src/node')
-rw-r--r-- | src/node/blockstorage.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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() |