Skip to content

Commit d54e819

Browse files
committed
Log warnings when bootstrap files are specified but cannot be opened
- Log a warning when bootstrap files are specified using `-loadblock` but cannot be opened. - Log a warning when bootstrap.dat exists in the home directory but cannot be opened.
1 parent 0ad474e commit d54e819

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/init.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
336336
LogPrintf("Importing bootstrap.dat...\n");
337337
LoadExternalBlockFile(file);
338338
RenameOver(pathBootstrap, pathBootstrapOld);
339+
} else {
340+
LogPrintf("Warning: Could not open bootstrap file %s\n", pathBootstrap.string());
339341
}
340342
}
341343

@@ -344,8 +346,10 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
344346
FILE *file = fopen(path.string().c_str(), "rb");
345347
if (file) {
346348
CImportingNow imp;
347-
LogPrintf("Importing %s...\n", path.string());
349+
LogPrintf("Importing blocks file %s...\n", path.string());
348350
LoadExternalBlockFile(file);
351+
} else {
352+
LogPrintf("Warning: Could not open blocks file %s\n", path.string());
349353
}
350354
}
351355
}

0 commit comments

Comments
 (0)