mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge pull request #4875
f7e3637Eliminate extra assignment (Suhas Daftuar)ec7eb0fWhen reindexing check for file before trying to open (refactored) (Suhas Daftuar)
This commit is contained in:
@@ -402,9 +402,11 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
|
||||
int nFile = 0;
|
||||
while (true) {
|
||||
CDiskBlockPos pos(nFile, 0);
|
||||
if (!boost::filesystem::exists(GetBlockPosFilename(pos, "blk")))
|
||||
break; // No block files left to reindex
|
||||
FILE *file = OpenBlockFile(pos, true);
|
||||
if (!file)
|
||||
break;
|
||||
break; // This error is logged in OpenBlockFile
|
||||
LogPrintf("Reindexing block file blk%05u.dat...\n", (unsigned int)nFile);
|
||||
LoadExternalBlockFile(file, &pos);
|
||||
nFile++;
|
||||
|
||||
Reference in New Issue
Block a user