MCPcopy Create free account
hub / github.com/ElementsProject/elements / UnlinkPrunedFiles

Function UnlinkPrunedFiles

src/node/blockstorage.cpp:591–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589}
590
591void UnlinkPrunedFiles(const std::set<int>& setFilesToPrune)
592{
593 for (std::set<int>::iterator it = setFilesToPrune.begin(); it != setFilesToPrune.end(); ++it) {
594 FlatFilePos pos(*it, 0);
595 fs::remove(BlockFileSeq().FileName(pos));
596 fs::remove(UndoFileSeq().FileName(pos));
597 LogPrint(BCLog::BLOCKSTORE, "Prune: %s deleted blk/rev (%05u)\n", __func__, *it);
598 }
599}
600
601static FlatFileSeq BlockFileSeq()
602{

Callers 2

FlushStateToDiskMethod · 0.85
BOOST_FIXTURE_TEST_CASEFunction · 0.85

Calls 5

BlockFileSeqFunction · 0.85
UndoFileSeqFunction · 0.85
FileNameMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by 1

BOOST_FIXTURE_TEST_CASEFunction · 0.68