Page MenuHomePhabricator

refactoring: introduce unused ChainActive()
ClosedPublic

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

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Restricted Owners Package(Owns No Changed Paths)
Commits
rSTAGING8b0ad8e95656: refactoring: introduce unused ChainActive()
rABC8b0ad8e95656: refactoring: introduce unused ChainActive()
Summary

in preparation for the following scripted-diff commit.

Partial Backport of Bitcoin Core PR15948 (commit a3a609079c):
https://github.com/bitcoin/bitcoin/pull/15948/commits/a3a609079c76dd2bbc72127488bf466cc61d8940

Depends on D5055

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
Branch
arcpatch-D5056
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9649
Build 17198: Default Diff Build & Tests
Build 17197: arc lint + arc unit

Event Timeline

fpelliccioni edited the test plan for this revision. (Show Details)
fpelliccioni added a reviewer: nakihito.
This revision is now accepted and ready to land.Jan 23 2020, 19:02
nakihito edited reviewers, added: fpelliccioni; removed: nakihito.
This revision now requires review to proceed.Feb 28 2020, 22:06
nakihito edited the summary of this revision. (Show Details)

Rebased.

Owners added a reviewer: Restricted Owners Package.Feb 28 2020, 22:11
deadalnix requested changes to this revision.EditedFeb 28 2020, 23:58

Partial Backport of Bitcoin Core PR15948 (commit a3a609079c):

Make your stuff greppable.

This revision now requires changes to proceed.Feb 28 2020, 23:58
nakihito edited the summary of this revision. (Show Details)

Fixed summary.

This revision is now accepted and ready to land.Feb 29 2020, 00:12