mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Move blockstorage option logging to LoadChainstate()
This commit is contained in:
parent
fa3358b668
commit
fa4c59d65b
2 changed files with 5 additions and 2 deletions
|
@ -938,14 +938,12 @@ bool AppInitParameterInteraction(const ArgsManager& args, bool use_syscall_sandb
|
|||
}
|
||||
nPruneTarget = (uint64_t) nPruneArg * 1024 * 1024;
|
||||
if (nPruneArg == 1) { // manual pruning: -prune=1
|
||||
LogPrintf("Block pruning enabled. Use RPC call pruneblockchain(height) to manually prune block and undo files.\n");
|
||||
nPruneTarget = std::numeric_limits<uint64_t>::max();
|
||||
fPruneMode = true;
|
||||
} else if (nPruneTarget) {
|
||||
if (nPruneTarget < MIN_DISK_SPACE_FOR_BLOCK_FILES) {
|
||||
return InitError(strprintf(_("Prune configured below the minimum of %d MiB. Please use a higher number."), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024));
|
||||
}
|
||||
LogPrintf("Prune configured to target %u MiB on disk for block and undo files.\n", nPruneTarget / 1024 / 1024);
|
||||
fPruneMode = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,11 @@ ChainstateLoadResult LoadChainstate(ChainstateManager& chainman, const CacheSize
|
|||
if (nMinimumChainWork < UintToArith256(chainman.GetConsensus().nMinimumChainWork)) {
|
||||
LogPrintf("Warning: nMinimumChainWork set below default value of %s\n", chainman.GetConsensus().nMinimumChainWork.GetHex());
|
||||
}
|
||||
if (nPruneTarget == std::numeric_limits<uint64_t>::max()) {
|
||||
LogPrintf("Block pruning enabled. Use RPC call pruneblockchain(height) to manually prune block and undo files.\n");
|
||||
} else if (nPruneTarget) {
|
||||
LogPrintf("Prune configured to target %u MiB on disk for block and undo files.\n", nPruneTarget / 1024 / 1024);
|
||||
}
|
||||
|
||||
LOCK(cs_main);
|
||||
chainman.InitializeChainstate(options.mempool);
|
||||
|
|
Loading…
Add table
Reference in a new issue