mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Move -checkblocks LogPrintf to AppInitMain
This commit is contained in:
@@ -1477,11 +1477,16 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
std::optional<ChainstateLoadVerifyError> rv2;
|
||||
try {
|
||||
uiInterface.InitMessage(_("Verifying blocks…").translated);
|
||||
auto check_blocks = args.GetIntArg("-checkblocks", DEFAULT_CHECKBLOCKS);
|
||||
if (fHavePruned && check_blocks > MIN_BLOCKS_TO_KEEP) {
|
||||
LogPrintf("Prune: pruned datadir may not have more than %d blocks; only checking available blocks\n",
|
||||
MIN_BLOCKS_TO_KEEP);
|
||||
}
|
||||
rv2 = VerifyLoadedChainstate(chainman,
|
||||
fReset,
|
||||
fReindexChainState,
|
||||
chainparams,
|
||||
args.GetIntArg("-checkblocks", DEFAULT_CHECKBLOCKS),
|
||||
check_blocks,
|
||||
args.GetIntArg("-checklevel", DEFAULT_CHECKLEVEL));
|
||||
} catch (const std::exception& e) {
|
||||
LogPrintf("%s\n", e.what());
|
||||
|
||||
Reference in New Issue
Block a user