diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2019-01-07 10:56:28 -0800 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2019-01-09 02:26:59 -0800 |
commit | ba8c8b22272ad40fe2de465d7e745532bab48d3b (patch) | |
tree | 3aeeed2359e4d2506aceb8e7ec5d2ced435cccae /src | |
parent | 1973257da0501169f9d1e1eb5c0896ac25b471f9 (diff) |
Fail if either disk space check fails
Rather than both.
Introduced in 386a6b62a8a1db9dd0f354cb95b7585f555c7e5d
Diffstat (limited to 'src')
-rw-r--r-- | src/init.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index 18c145a023..f4f00ea691 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1631,8 +1631,14 @@ bool AppInitMain(InitInterfaces& interfaces) // ********************************************************* Step 11: import blocks - if (!CheckDiskSpace() && !CheckDiskSpace(0, true)) + if (!CheckDiskSpace(/* additional_bytes */ 0, /* blocks_dir */ false)) { + InitError(strprintf(_("Error: Disk space is low for %s"), GetDataDir())); return false; + } + if (!CheckDiskSpace(/* additional_bytes */ 0, /* blocks_dir */ true)) { + InitError(strprintf(_("Error: Disk space is low for %s"), GetBlocksDir())); + 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. |