mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
move-mostly: Make pindexBestHeader a ChainMan member
[META] In the next commit, we move the clearing of pindexBestHeader to
ChainstateManager::Unload()
This commit is contained in:
@@ -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.pindexBestHeader) {
|
||||
tip_info->header_height = chainman.pindexBestHeader->nHeight;
|
||||
tip_info->header_time = chainman.pindexBestHeader->GetBlockTime();
|
||||
}
|
||||
}
|
||||
LogPrintf("nBestHeight = %d\n", chain_active_height);
|
||||
|
||||
Reference in New Issue
Block a user