HomePhabricator

validation: Load pindexBestHeader in ChainMan

Description

validation: Load pindexBestHeader in ChainMan

Summary:
Now BlockManager::LoadBlockIndex() will ACTUALLY only load BlockMan
members.

[META] In a later commit, pindexBestHeader will be moved to ChainMan as a member


Code Reviewer Notes

Call graph of relevant functions:

ChainstateManager::LoadBlockIndex()<-- Moved to
calls BlockManager::LoadBlockIndexDB()
which calls BlockManager::LoadBlockIndex() <-- Moved from

There is only one call to each of inner functions, meaning that no
behavior is changing.

This is a partial backport of core#24909
https://github.com/bitcoin/bitcoin/pull/24909/commits/5d670173a32ccdcb25d3a6bf97317f0ac774e0ed

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13043

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Mar 18 2022, 16:22
PiRKCommitted on Jan 24 2023, 13:29
PiRKPushed on Jan 24 2023, 13:29
Reviewer
Restricted Project
Differential Revision
D13043: validation: Load pindexBestHeader in ChainMan
Parents
rABCf7a1adfb8971: [avalanche] Fix type error in abc_p2p_avalanche_peer_discovery
Branches
Unknown
Tags
Unknown