Do diskspace check before import thread is started

(cherry picked from commit bitcoin/bitcoin@9d4eb9ad99)
This commit is contained in:
Pieter Wuille 2016-07-22 16:01:51 +02:00 committed by Jack Grigg
parent 084906c845
commit 8489f27afa
1 changed files with 3 additions and 3 deletions

View File

@ -1877,6 +1877,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// ********************************************************* Step 10: import blocks
if (!CheckDiskSpace())
return false;
// Either install a handler to notify us when genesis activates, or set fHaveGenesis directly.
// No locking, as this happens before any background thread is started.
if (chainActive.Tip() == NULL) {
@ -1914,9 +1917,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// ********************************************************* Step 11: start node
if (!CheckDiskSpace())
return false;
if (!strErrors.str().empty())
return InitError(strErrors.str());