Page MenuHomePhabricator

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

Authored by PiRK on Jul 14 2022, 08:02.

Details

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

Diff Detail