Page MenuHomePhabricator

rename: CChainState.chainActive -> m_chain
ClosedPublic

Authored by nakihito on Jan 23 2020, 18:16.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Restricted Owners Package(Owns No Changed Paths)
Commits
rSTAGINGf99b18b3f609: rename: CChainState.chainActive -> m_chain
rABCf99b18b3f609: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those Bitcoin Core PRs have been inserted into the summary for reference.

fpelliccioni retitled this revision from refactor: rename chainActive to rename: CChainState.chainActive -> m_chain.
fpelliccioni edited the test plan for this revision. (Show Details)
fpelliccioni added a reviewer: nakihito.
fpelliccioni edited the summary of this revision. (Show Details)
fpelliccioni edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jan 23 2020, 18:48
nakihito edited reviewers, added: fpelliccioni; removed: nakihito.
This revision now requires review to proceed.Feb 28 2020, 22:05
nakihito edited the summary of this revision. (Show Details)

Rebased.

Owners added a reviewer: Restricted Owners Package.Feb 28 2020, 22:08
deadalnix edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 28 2020, 23:52