Browse Source

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.
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
d54e819f65
  1. 6
      src/init.cpp

6
src/init.cpp

@ -336,6 +336,8 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) @@ -336,6 +336,8 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
LogPrintf("Importing bootstrap.dat...\n");
LoadExternalBlockFile(file);
RenameOver(pathBootstrap, pathBootstrapOld);
} else {
LogPrintf("Warning: Could not open bootstrap file %s\n", pathBootstrap.string());
}
}
@ -344,8 +346,10 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) @@ -344,8 +346,10 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
FILE *file = fopen(path.string().c_str(), "rb");
if (file) {
CImportingNow imp;
LogPrintf("Importing %s...\n", path.string());
LogPrintf("Importing blocks file %s...\n", path.string());
LoadExternalBlockFile(file);
} else {
LogPrintf("Warning: Could not open blocks file %s\n", path.string());
}
}
}

Loading…
Cancel
Save