diff options
author | Matt Corallo <git@bluematt.me> | 2014-11-07 23:18:21 -0800 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2014-12-20 22:11:51 -0500 |
commit | ff09e31a51dcee404c9c037c7c5f50c522e67ea8 (patch) | |
tree | 36350fea9904af895baf40ca8a5eaf47890aaba4 /src/init.cpp | |
parent | f914f1a746d7f91951c1da262a4a749dd3ebfa71 (diff) |
sleep-wait on genesis block during init with -reindex
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 220d3b93ae..afcfdb0621 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1207,6 +1207,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 |