aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 86e6ec4451..c0af2b136f 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -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;
@@ -660,7 +659,8 @@ void InitParameterInteraction(ArgsManager& args)
LogPrintf("%s: parameter interaction: -connect set -> setting -listen=0\n", __func__);
}
- if (args.IsArgSet("-proxy")) {
+ std::string proxy_arg = args.GetArg("-proxy", "");
+ if (proxy_arg != "" && proxy_arg != "0") {
// to protect privacy, do not listen by default if a default proxy server is specified
if (args.SoftSetBoolArg("-listen", false))
LogPrintf("%s: parameter interaction: -proxy set -> setting -listen=0\n", __func__);
@@ -1480,7 +1480,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.m_have_pruned && 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);
}
@@ -1664,9 +1664,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
tip_info->block_time = chainman.ActiveChain().Tip() ? chainman.ActiveChain().Tip()->GetBlockTime() : Params().GenesisBlock().GetBlockTime();
tip_info->verification_progress = GuessVerificationProgress(Params().TxData(), chainman.ActiveChain().Tip());
}
- if (tip_info && ::pindexBestHeader) {
- tip_info->header_height = ::pindexBestHeader->nHeight;
- tip_info->header_time = ::pindexBestHeader->GetBlockTime();
+ if (tip_info && chainman.m_best_header) {
+ tip_info->header_height = chainman.m_best_header->nHeight;
+ tip_info->header_time = chainman.m_best_header->GetBlockTime();
}
}
LogPrintf("nBestHeight = %d\n", chain_active_height);