move-mostly: Make fHavePruned a BlockMan member

[META] In the next commit, we move the clearing of fHavePruned to
       BlockManager::Unload()
This commit is contained in:
Carl Dong
2020-12-24 20:06:34 -05:00
parent c96524113c
commit 3308ecd3fc
10 changed files with 35 additions and 38 deletions

View File

@@ -109,7 +109,6 @@ using node::LoadChainstate;
using node::NodeContext;
using node::ThreadImport;
using node::VerifyLoadedChainstate;
using node::fHavePruned;
using node::fPruneMode;
using node::fReindex;
using node::nPruneTarget;
@@ -1480,7 +1479,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
try {
uiInterface.InitMessage(_("Verifying blocks…").translated);
auto check_blocks = args.GetIntArg("-checkblocks", DEFAULT_CHECKBLOCKS);
if (fHavePruned && check_blocks > MIN_BLOCKS_TO_KEEP) {
if (chainman.m_blockman.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);
}