aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/node/blockstorage.cpp5
-rw-r--r--src/validation.cpp4
2 files changed, 5 insertions, 4 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()
diff --git a/src/validation.cpp b/src/validation.cpp
index 58bced48c9..db1a96498c 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3980,10 +3980,6 @@ void UnloadBlockIndex(CTxMemPool* mempool, ChainstateManager& chainman)
chainman.Unload();
pindexBestHeader = nullptr;
if (mempool) mempool->clear();
- vinfoBlockFile.clear();
- nLastBlockFile = 0;
- setDirtyBlockIndex.clear();
- setDirtyFileInfo.clear();
g_versionbitscache.Clear();
for (int b = 0; b < VERSIONBITS_NUM_BITS; b++) {
warningcache[b].clear();