From c5044bc1693ced50ed070a27e7d2f3174202ace5 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 7 Nov 2014 23:18:21 -0800 Subject: [PATCH] sleep-wait on genesis block during init with -reindex Rebased-From: ff09e31a51dcee404c9c037c7c5f50c522e67ea8 Github-Pull: #5243 --- src/init.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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