Merge 9eaef10801 into merged_master (Bitcoin PR bitcoin/bitcoin#25707)

This commit is contained in:
Byron Hambly 2024-11-04 11:26:40 +02:00
commit 1006327a13
28 changed files with 43 additions and 39 deletions

View file

@ -426,7 +426,7 @@ void CleanupBlockRevFiles()
// Remove the rev files immediately and insert the blk file paths into an
// ordered map keyed by block file index.
LogPrintf("Removing unusable blk?????.dat and rev?????.dat files for -reindex with -prune\n");
fs::path blocksdir = gArgs.GetBlocksDirPath();
const fs::path& blocksdir = gArgs.GetBlocksDirPath();
for (fs::directory_iterator it(blocksdir); it != fs::directory_iterator(); it++) {
const std::string path = fs::PathToString(it->path().filename());
if (fs::is_regular_file(*it) &&