diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-18 18:36:31 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-18 18:46:48 +0200 |
commit | fa1b76aeb064b315a3767a8f59836ca18aeb117e (patch) | |
tree | ab057aca9b58d826758f61a920f48ea0eb9ef241 /src/init.cpp | |
parent | fa30234be81b6f49ae8150478a9255daa1611083 (diff) | |
download | bitcoin-fa1b76aeb064b315a3767a8f59836ca18aeb117e.tar.xz |
Do not call global Params() when chainman is in scope
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp index 7499333d69..dc51ad0105 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1680,8 +1680,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) chain_active_height = chainman.ActiveChain().Height(); if (tip_info) { tip_info->block_height = chain_active_height; - tip_info->block_time = chainman.ActiveChain().Tip() ? chainman.ActiveChain().Tip()->GetBlockTime() : Params().GenesisBlock().GetBlockTime(); - tip_info->verification_progress = GuessVerificationProgress(Params().TxData(), chainman.ActiveChain().Tip()); + tip_info->block_time = chainman.ActiveChain().Tip() ? chainman.ActiveChain().Tip()->GetBlockTime() : chainman.GetParams().GenesisBlock().GetBlockTime(); + tip_info->verification_progress = GuessVerificationProgress(chainman.GetParams().TxData(), chainman.ActiveChain().Tip()); } if (tip_info && chainman.m_best_header) { tip_info->header_height = chainman.m_best_header->nHeight; |