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

Function UnlinkPrunedFiles

src/validation.cpp:3904–3912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3902
3903
3904void UnlinkPrunedFiles(const std::set<int>& setFilesToPrune)
3905{
3906 for (std::set<int>::iterator it = setFilesToPrune.begin(); it != setFilesToPrune.end(); ++it) {
3907 CDiskBlockPos pos(*it, 0);
3908 fs::remove(GetBlockPosFilename(pos, "blk"));
3909 fs::remove(GetBlockPosFilename(pos, "rev"));
3910 LogPrintf("Prune: %s deleted blk/rev (%05u)\n", __func__, *it);
3911 }
3912}
3913
3914/* Calculate the block/rev files to delete based on height specified by user with RPC command pruneblockchain */
3915static void FindFilesToPruneManual(std::set<int>& setFilesToPrune, int nManualPruneHeight)

Callers 2

FlushStateToDiskFunction · 0.85
BOOST_FIXTURE_TEST_CASEFunction · 0.85

Calls 3

GetBlockPosFilenameFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by 1

BOOST_FIXTURE_TEST_CASEFunction · 0.68