mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 04:42:36 -03:00
Clear fHavePruned in BlockManager::Unload()
----- Code Reviewer Notes Call graph of relevant functions: UnloadBlockIndex() <-- Moved from calls ChainstateManager::Unload() which calls BlockManager::Unload() <-- Moved to So calling UnloadBlockIndex() would still run this moved code. The code will also now run when ~BlockManager gets called, which makes sense.
This commit is contained in:
parent
3308ecd3fc
commit
a401402125
2 changed files with 2 additions and 1 deletions
|
@ -300,6 +300,8 @@ void BlockManager::Unload()
|
||||||
m_last_blockfile = 0;
|
m_last_blockfile = 0;
|
||||||
m_dirty_blockindex.clear();
|
m_dirty_blockindex.clear();
|
||||||
m_dirty_fileinfo.clear();
|
m_dirty_fileinfo.clear();
|
||||||
|
|
||||||
|
fHavePruned = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BlockManager::WriteBlockIndexDB()
|
bool BlockManager::WriteBlockIndexDB()
|
||||||
|
|
|
@ -4126,7 +4126,6 @@ void UnloadBlockIndex(CTxMemPool* mempool, ChainstateManager& chainman)
|
||||||
for (int b = 0; b < VERSIONBITS_NUM_BITS; b++) {
|
for (int b = 0; b < VERSIONBITS_NUM_BITS; b++) {
|
||||||
warningcache[b].clear();
|
warningcache[b].clear();
|
||||||
}
|
}
|
||||||
chainman.m_blockman.fHavePruned = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChainstateManager::LoadBlockIndex()
|
bool ChainstateManager::LoadBlockIndex()
|
||||||
|
|
Loading…
Reference in a new issue