HomePhabricator

use m_chain in CChainState::UpdateFlagsForBlock and CChainState::FinalizeBlock

Description

use m_chain in CChainState::UpdateFlagsForBlock and CChainState::FinalizeBlock

Summary:
This removes the last occurences of ::Chain(State)Active in the code after D11704, D11742 and D11744 are landed. There are some remaining occurences in comments, which are removed in a later backport (core#23258)

I checked in the codebase that these methods are only called on the active chainstate. It does not make much sense to finalize blocks in a chain base on the state of some other chain anyway.

Test Plan:
Before running the tests, add the following line in both modified methods:

assert(std::addressof(m_chain) == std::addressof(::ChainActive()));

ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
PiRKAuthored on Jul 14 2022, 07:52
PiRKPushed on Jul 15 2022, 07:43
Reviewer
Restricted Project
Differential Revision
D11748: use m_chain in CChainState::UpdateFlagsForBlock and CChainState::FinalizeBlock
Parents
rABCc9189fd7a317: pass active_chainstate to buildRandomProof
Branches
Unknown
Tags
Unknown