Merge #15124: Fail AppInitMain if either disk space check fails
ba8c8b2227
Fail if either disk space check fails (Ben Woosley) Pull request description: Rather than both. Introduced in386a6b62a8
, #12653 Tree-SHA512: 24765dd3c62b742c491d7d9a751917c2ce6f3819a8764a7725ce84910ef69bffca07f4c0dfbeed8c4f978a12c4b04a2ac3b8c2ff59602330a8a3e8a68878c41b
This commit is contained in:
commit
195d28fecb
1 changed files with 7 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue