MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / ScanAndUnlinkAlreadyPrunedFiles

Method ScanAndUnlinkAlreadyPrunedFiles

src/node/blockstorage.cpp:610–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608}
609
610void BlockManager::ScanAndUnlinkAlreadyPrunedFiles()
611{
612 AssertLockHeld(::cs_main);
613 int max_blockfile{this->MaxBlockfileNum()};
614 if (!m_have_pruned) {
615 return;
616 }
617
618 std::set<int> block_files_to_prune;
619 for (int file_number = 0; file_number < max_blockfile; file_number++) {
620 if (m_blockfile_info[file_number].nSize == 0) {
621 block_files_to_prune.insert(file_number);
622 }
623 }
624
625 UnlinkPrunedFiles(block_files_to_prune);
626}
627
628bool BlockManager::IsBlockPruned(const CBlockIndex& block) const
629{

Callers 2

LoadBlockIndexMethod · 0.80
BOOST_FIXTURE_TEST_CASEFunction · 0.80

Calls 1

insertMethod · 0.45

Tested by 1

BOOST_FIXTURE_TEST_CASEFunction · 0.64