Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 1,122 Lines • ▼ Show 20 Lines | static void ThreadImport(const Config &config, | ||||
{ | { | ||||
CImportingNow imp; | CImportingNow imp; | ||||
// -reindex | // -reindex | ||||
if (fReindex) { | if (fReindex) { | ||||
int nFile = 0; | int nFile = 0; | ||||
while (true) { | while (true) { | ||||
CDiskBlockPos pos(nFile, 0); | FlatFilePos pos(nFile, 0); | ||||
if (!fs::exists(GetBlockPosFilename(pos))) { | if (!fs::exists(GetBlockPosFilename(pos))) { | ||||
// No block files left to reindex | // No block files left to reindex | ||||
break; | break; | ||||
} | } | ||||
FILE *file = OpenBlockFile(pos, true); | FILE *file = OpenBlockFile(pos, true); | ||||
if (!file) { | if (!file) { | ||||
// This error is logged in OpenBlockFile | // This error is logged in OpenBlockFile | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 1,349 Lines • Show Last 20 Lines |