diff --git a/src/init.cpp b/src/init.cpp index 281e0d49664e7..0eb33ec132201 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1631,10 +1631,11 @@ 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 assumed_chain_bytes{chainparams.AssumedBlockchainSize() * 1024 * 1024 * 1024}; uint64_t additional_bytes_needed{ chainman.m_blockman.IsPruneMode() ? - chainman.m_blockman.GetPruneTarget() : - chainparams.AssumedBlockchainSize() * 1024 * 1024 * 1024}; + std::min(chainman.m_blockman.GetPruneTarget(), assumed_chain_bytes) : + assumed_chain_bytes}; if (!CheckDiskSpace(args.GetBlocksDirPath(), additional_bytes_needed)) { InitWarning(strprintf(_(