MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / UnlinkPrunedFiles

Function UnlinkPrunedFiles

src/main.cpp:3707–3715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3705
3706
3707void UnlinkPrunedFiles(std::set<int>& setFilesToPrune)
3708{
3709 for (set<int>::iterator it = setFilesToPrune.begin(); it != setFilesToPrune.end(); ++it) {
3710 CDiskBlockPos pos(*it, 0);
3711 boost::filesystem::remove(GetBlockPosFilename(pos, "blk"));
3712 boost::filesystem::remove(GetBlockPosFilename(pos, "rev"));
3713 LogPrintf("Prune: %s deleted blk/rev (%05u)\n", __func__, *it);
3714 }
3715}
3716
3717/* Calculate the block/rev files that should be deleted to remain under target*/
3718void FindFilesToPrune(std::set<int>& setFilesToPrune)

Callers 1

FlushStateToDiskFunction · 0.85

Calls 3

GetBlockPosFilenameFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected