File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1811,17 +1811,17 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
18111811
18121812 // ********************************************************* Step 12: start node
18131813
1814- // // debug print
18151814 int64_t best_block_time{};
18161815 {
1817- LOCK (cs_main);
1816+ LOCK (chainman.GetMutex ());
1817+ const auto & tip{*Assert (chainman.ActiveTip ())};
18181818 LogPrintf (" block tree size = %u\n " , chainman.BlockIndex ().size ());
1819- chain_active_height = chainman. ActiveChain (). Height () ;
1820- best_block_time = chainman. ActiveChain (). Tip () ? chainman. ActiveChain (). Tip ()-> GetBlockTime () : chainman. GetParams (). GenesisBlock () .GetBlockTime ();
1819+ chain_active_height = tip. nHeight ;
1820+ best_block_time = tip .GetBlockTime ();
18211821 if (tip_info) {
18221822 tip_info->block_height = chain_active_height;
18231823 tip_info->block_time = best_block_time;
1824- tip_info->verification_progress = GuessVerificationProgress (chainman.GetParams ().TxData (), chainman. ActiveChain (). Tip () );
1824+ tip_info->verification_progress = GuessVerificationProgress (chainman.GetParams ().TxData (), &tip );
18251825 }
18261826 if (tip_info && chainman.m_best_header ) {
18271827 tip_info->header_height = chainman.m_best_header ->nHeight ;
You can’t perform that action at this time.
0 commit comments