diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-26 12:29:06 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-01-26 12:29:15 +0100 |
commit | 2fae1875ea9e44c46d6cc3e679b5500f4c783ea4 (patch) | |
tree | 806a5fedc0cd300b82e6e4bb3dfac9dbfa8afc67 /src/init.cpp | |
parent | 8204e19abed6c6ee8dca4a00943abfc52ea68fab (diff) | |
parent | ff09e31a51dcee404c9c037c7c5f50c522e67ea8 (diff) |
Merge pull request #5243
ff09e31 sleep-wait on genesis block during init with -reindex (Matt Corallo)
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 828c525dcb..aaa5f06c75 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1254,6 +1254,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 |