mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
prune: scan and unlink already pruned block files on startup
This commit is contained in:
@@ -4260,6 +4260,8 @@ bool ChainstateManager::LoadBlockIndex()
|
||||
bool ret = m_blockman.LoadBlockIndexDB(GetConsensus());
|
||||
if (!ret) return false;
|
||||
|
||||
m_blockman.ScanAndUnlinkAlreadyPrunedFiles();
|
||||
|
||||
std::vector<CBlockIndex*> vSortedByHeight{m_blockman.GetAllBlockIndices()};
|
||||
std::sort(vSortedByHeight.begin(), vSortedByHeight.end(),
|
||||
CBlockIndexHeightOnlyComparator());
|
||||
|
||||
Reference in New Issue
Block a user