sleep-wait on genesis block during init with -reindex

Rebased-From: ff09e31a51
Github-Pull: #5243
This commit is contained in:
Matt Corallo 2014-11-07 23:18:21 -08:00 committed by Wladimir J. van der Laan
parent b24ff47c64
commit c5044bc169
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 5 additions and 0 deletions

View File

@ -1248,6 +1248,11 @@ bool AppInit2(boost::thread_group& threadGroup)
vImportFiles.push_back(strFile);
}
threadGroup.create_thread(boost::bind(&ThreadImport, vImportFiles));
if (chainActive.Tip() == NULL) {
LogPrintf("Waiting for genesis block to be imported...\n");
while (!fRequestShutdown && chainActive.Tip() == NULL)
MilliSleep(10);
}
// ********************************************************* Step 10: start node