aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-01-16 17:23:18 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-01-16 17:31:32 +0100
commitfaf7b4f1fc35f1488567e0e4a57ecb348596b992 (patch)
tree9392926559a340b437ef3ecf342b56a59c28b321 /src/init.cpp
parentfae71fe27ec021583aaeac09aa924522bb63db05 (diff)
Add BlockManager::IsPruneMode()
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp
index ae62076076..2fc10c924a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1479,7 +1479,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
options.mempool = Assert(node.mempool.get());
options.reindex = node::fReindex;
options.reindex_chainstate = fReindexChainState;
- options.prune = node::fPruneMode;
+ options.prune = chainman.m_blockman.IsPruneMode();
options.check_blocks = args.GetIntArg("-checkblocks", DEFAULT_CHECKBLOCKS);
options.check_level = args.GetIntArg("-checklevel", DEFAULT_CHECKLEVEL);
options.check_interrupt = ShutdownRequested;
@@ -1589,7 +1589,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
// if pruning, perform the initial blockstore prune
// after any wallet rescanning has taken place.
- if (fPruneMode) {
+ if (chainman.m_blockman.IsPruneMode()) {
if (!fReindex) {
LOCK(cs_main);
for (Chainstate* chainstate : chainman.GetAll()) {
@@ -1618,7 +1618,7 @@ 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 ?
+ chainman.m_blockman.IsPruneMode() ?
chainman.m_blockman.GetPruneTarget() :
chainparams.AssumedBlockchainSize() * 1024 * 1024 * 1024};