Page MenuHomePhabricator

refactor: rename chainActive
AbandonedPublic

Authored by fpelliccioni on Jan 22 2020, 18:42.

Details

Reviewers
deadalnix
markblundeberg
nakihito
Group Reviewers
Restricted Project
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.

Backport of Bitcoin Core PR15948
https://github.com/bitcoin/bitcoin/pull/15948

Test Plan
ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
feature-backport-PR15948
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 9107
Build 16175: Bitcoin ABC Buildbot
Build 16174: arc lint + arc unit

Event Timeline

fpelliccioni created this revision.Jan 22 2020, 18:42
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 22 2020, 18:42
teamcity edited the summary of this revision. (Show Details)Jan 22 2020, 18:42

[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 edited the test plan for this revision. (Show Details)Jan 22 2020, 18:42
fpelliccioni added a reviewer: markblundeberg.
fpelliccioni edited the summary of this revision. (Show Details)
fpelliccioni planned changes to this revision.Jan 22 2020, 18:46
fpelliccioni updated this revision to Diff 15741.Jan 22 2020, 18:49

squashed commits

nakihito requested changes to this revision.Jan 22 2020, 19:30
nakihito added a subscriber: nakihito.

There are a lot of parts from the original PR that are missing here. That, in addition to the fact that this patch is massive makes it really hard to review. This would be better broken into smaller parts, ignoring the fact that there are at least a few dependencies that should be completed before this.

src/net_processing.cpp
3085

Comment should be on its own line.

src/rpc/blockchain.cpp
1416

"Algorithm:" should be on its own line.

src/test/blockfilter_index_tests.cpp
321

You're missing a dependency that adds initially adds this file. See https://github.com/bitcoin/bitcoin/pull/14121/files

src/test/setup_common.cpp
157

This is the only change that matches the original PR. You're missing changes from a previous PR.

src/test/util.cpp
86
This revision now requires changes to proceed.Jan 22 2020, 19:30
fpelliccioni planned changes to this revision.Jan 23 2020, 17:52
fpelliccioni abandoned this revision.Jan 24 2020, 13:07