aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2014-11-07 23:18:21 -0800
committerWladimir J. van der Laan <laanwj@gmail.com>2015-01-26 12:29:56 +0100
commitc5044bc1693ced50ed070a27e7d2f3174202ace5 (patch)
treeb353c12f9af29e617beb7fe27895586a81b35cd1
parentb24ff47c6487d6cb81c9691c4e68c33f367fce74 (diff)
downloadbitcoin-c5044bc1693ced50ed070a27e7d2f3174202ace5.tar.xz
sleep-wait on genesis block during init with -reindex
Rebased-From: ff09e31a51dcee404c9c037c7c5f50c522e67ea8 Github-Pull: #5243
-rw-r--r--src/init.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp
index a91418cd5a..df199ae487 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -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