mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02: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:
parent
5d670173a3
commit
0d567daf23
8 changed files with 45 additions and 42 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue