aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-07-22 16:01:51 +0200
committerLuke Dashjr <luke-jr+git@utopios.org>2016-09-21 02:43:47 +0000
commitfc349288cbcfe3df20d91cc16149b973eb14e272 (patch)
tree86bbb36240611a24a8bfb9049dd27e2f4ca03a4d /src
parent3b354d213f99b89a1baf9a2c5895f172e4b351c3 (diff)
downloadbitcoin-fc349288cbcfe3df20d91cc16149b973eb14e272.tar.xz
Do diskspace check before import thread is started
Github-Pull: #8392 Rebased-From: 9d4eb9ad99f7c3abf7abaeaf7ea51f98f9445e75
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 4458c8331b..44d8c16d95 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1418,6 +1418,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) {
@@ -1449,9 +1452,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());