mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
prune: scan and unlink already pruned block files on startup
This commit is contained in:
parent
dcdfd72861
commit
77557dda4a
3 changed files with 32 additions and 3 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue