Skip to content

Commit

Permalink
Fail if either disk space check fails
Browse files Browse the repository at this point in the history
Rather than both.

Introduced in 386a6b6
  • Loading branch information
Empact committed Jan 9, 2019
1 parent 1973257 commit ba8c8b2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ba8c8b2

Please sign in to comment.