From ff09e31a51dcee404c9c037c7c5f50c522e67ea8 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 --- src/init.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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