mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 13:06:29 +02:00
Merge #15124: Fail AppInitMain if either disk space check fails
ba8c8b22272ad40fe2de465d7e745532bab48d3b Fail if either disk space check fails (Ben Woosley) Pull request description: Rather than both. Introduced in 386a6b62a8a1db9dd0f354cb95b7585f555c7e5d, #12653 Tree-SHA512: 24765dd3c62b742c491d7d9a751917c2ce6f3819a8764a7725ce84910ef69bffca07f4c0dfbeed8c4f978a12c4b04a2ac3b8c2ff59602330a8a3e8a68878c41b
This commit is contained in:
commit
195d28fecb
@ -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…
x
Reference in New Issue
Block a user