HomePhabricator

rename: CChainState.chainActive -> m_chain

Description

rename: CChainState.chainActive -> m_chain

Summary:
rename: CChainState.chainActive -> m_chain

Partial Backport of Bitcoin Core PR15948 (commit 1b6e6fcfd2):
https://github.com/bitcoin/bitcoin/pull/15948/commits/1b6e6fcfd2f8a8def148ea0f50af202d5cae318a

PR Summary:

This is part of the assumeutxo project:

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

This change refactors the chainActive reference into a ::ChainActive() call. It also distinguishes CChainState's CChain data member as m_chain instead of the current chainActive, which makes it easily confused with the global data.

The active chain must be obtained via function because its reference will be swapped at some point during runtime after loading a UTXO snapshot.

This change, though lengthy, should be pretty easy to review since most of it is contained within a scripted-diff. Once merged, the parent PR should be easier to review.

Test Plan:

ninja check

Reviewers: #bitcoin_abc, deadalnix, O1 Bitcoin ABC

Reviewed By: #bitcoin_abc, deadalnix, O1 Bitcoin ABC

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

Details

Provenance
James O'Beirne <james.obeirne@gmail.com>Authored on Feb 25 2020, 22:32
nakihitoCommitted on Feb 29 2020, 02:15
deadalnixPushed on Feb 29 2020, 16:44
Reviewer
Restricted Project
Differential Revision
D5055: rename: CChainState.chainActive -> m_chain
Parents
rSTAGING077e243c6a7d: Fix CPack NSIS homepage
Branches
Unknown
Tags
Unknown