mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Add BlockManager::GetPruneTarget()
This commit is contained in:
parent
fa0f0436d8
commit
fae71fe27e
4 changed files with 11 additions and 7 deletions
|
|
@ -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(_(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue