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)
1811
1811
1812
1812
// ********************************************************* Step 12: start node
1813
1813
1814
- // // debug print
1815
1814
int64_t best_block_time{};
1816
1815
{
1817
- LOCK (cs_main);
1816
+ LOCK (chainman.GetMutex ());
1817
+ const auto & tip{*Assert (chainman.ActiveTip ())};
1818
1818
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 ();
1821
1821
if (tip_info) {
1822
1822
tip_info->block_height = chain_active_height;
1823
1823
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 );
1825
1825
}
1826
1826
if (tip_info && chainman.m_best_header ) {
1827
1827
tip_info->header_height = chainman.m_best_header ->nHeight ;
You can’t perform that action at this time.
0 commit comments