mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Add BlockManager::GetPruneTarget()
This commit is contained in:
@@ -1617,8 +1617,10 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
|
||||
// On first startup, warn on low block storage space
|
||||
if (!fReindex && !fReindexChainState && chain_active_height <= 1) {
|
||||
uint64_t additional_bytes_needed = fPruneMode ? nPruneTarget
|
||||
: chainparams.AssumedBlockchainSize() * 1024 * 1024 * 1024;
|
||||
uint64_t additional_bytes_needed{
|
||||
fPruneMode ?
|
||||
chainman.m_blockman.GetPruneTarget() :
|
||||
chainparams.AssumedBlockchainSize() * 1024 * 1024 * 1024};
|
||||
|
||||
if (!CheckDiskSpace(args.GetBlocksDirPath(), additional_bytes_needed)) {
|
||||
InitWarning(strprintf(_(
|
||||
|
||||
Reference in New Issue
Block a user