aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2014-11-07 23:18:21 -0800
committerMatt Corallo <[email protected]>2014-12-20 22:11:51 -0500
commitff09e31a51dcee404c9c037c7c5f50c522e67ea8 (patch)
tree36350fea9904af895baf40ca8a5eaf47890aaba4 /src/init.cpp
parentAdded "Core" to copyright headers (diff)
downloaddiscoin-ff09e31a51dcee404c9c037c7c5f50c522e67ea8.tar.xz
discoin-ff09e31a51dcee404c9c037c7c5f50c522e67ea8.zip
sleep-wait on genesis block during init with -reindex
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 220d3b93a..afcfdb062 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