| 3902 | |
| 3903 | |
| 3904 | void 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 */ |
| 3915 | static void FindFilesToPruneManual(std::set<int>& setFilesToPrune, int nManualPruneHeight) |