Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 2,309 Lines • ▼ Show 20 Lines | if (fPruneMode) { | ||||
nLocalServices = ServiceFlags(nLocalServices & ~NODE_NETWORK); | nLocalServices = ServiceFlags(nLocalServices & ~NODE_NETWORK); | ||||
if (!fReindex) { | if (!fReindex) { | ||||
uiInterface.InitMessage(_("Pruning blockstore...")); | uiInterface.InitMessage(_("Pruning blockstore...")); | ||||
PruneAndFlush(); | PruneAndFlush(); | ||||
} | } | ||||
} | } | ||||
// Step 11: import blocks | // Step 11: import blocks | ||||
if (!CheckDiskSpace(/* additional_bytes */ 0, /* blocks_dir */ false)) { | if (!CheckDiskSpace(GetDataDir())) { | ||||
InitError( | InitError( | ||||
strprintf(_("Error: Disk space is low for %s"), GetDataDir())); | strprintf(_("Error: Disk space is low for %s"), GetDataDir())); | ||||
return false; | return false; | ||||
} | } | ||||
if (!CheckDiskSpace(/* additional_bytes */ 0, /* blocks_dir */ true)) { | if (!CheckDiskSpace(GetBlocksDir())) { | ||||
InitError( | InitError( | ||||
strprintf(_("Error: Disk space is low for %s"), GetBlocksDir())); | strprintf(_("Error: Disk space is low for %s"), GetBlocksDir())); | ||||
return false; | return false; | ||||
} | } | ||||
// Either install a handler to notify us when genesis activates, or set | // Either install a handler to notify us when genesis activates, or set | ||||
// fHaveGenesis directly. | // fHaveGenesis directly. | ||||
// No locking, as this happens before any background thread is started. | // No locking, as this happens before any background thread is started. | ||||
▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines |