HomePhabricator

[backport#16743] refactor: move LoadChainTip/RelayBlocks under CChainState

Description

[backport#16743] refactor: move LoadChainTip/RelayBlocks under CChainState

Summary:
3cf36736e540cf06250701f0934a7946836d000d refactoring: move ReplayBlocks under CChainState (James O'Beirne)
bcf73d3b84649c8786f0cccc6862dd1bbdb9950b refactoring: move LoadChainTip to CChainState method (James O'Beirne)
f5809d5b135c7f9de5217d3cda76638fe7eed58a doc: fix CChainState::ActivateBestChain doc (James O'Beirne)

Pull request description:

This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11):

Parent PR: #15606
Issue: #15605
Specification: https://github.com/jamesob/assumeutxo-docs/tree/master/proposal

---

Move more chainstate-related functionality to methods on CChainState. Nothing too interesting here, but needed to work with multiple chainstates. And brief to review. :)

Also fixes doc on ActivateBestChain.

ACKs for top commit:

MarcoFalke:
  ACK 3cf36736e540cf06250701f0934a7946836d000d
ryanofsky:
  Can confirm. utACK 3cf36736e540cf06250701f0934a7946836d000d. Removes wrapper functions and removes more  ::ChainActive() and ::ChainstateActive() calls than it adds, so seems good.

Backport of Core PR16743

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Oct 16 2020, 19:48
majcostaCommitted on Oct 16 2020, 19:49
abc-botPushed on Oct 16 2020, 19:54
Reviewer
Restricted Project
Differential Revision
D7960: [backport#16743] refactor: move LoadChainTip/RelayBlocks under CChainState
Parents
rABC39fae5b8b23d: [land-bot] Give a reasonable error when a revision cannot be found
Branches
Unknown
Tags
Unknown