HomePhabricator

scripted-diff: replace chainActive -> ::ChainActive()

Description

scripted-diff: replace chainActive -> ::ChainActive()

Summary:
Though at the moment ChainActive() simply references g_chainstate.m_chain,
doing this change now clears the way for multiple chainstate usage and allows
us to script the diff.

-BEGIN VERIFY SCRIPT-
git grep -l "chainActive" | grep -E '(h|cpp)$' | xargs sed -i '/chainActive =/b; /extern CChain& chainActive/b; s/\(::\)\{0,1\}chainActive/::ChainActive()/g'
-END VERIFY SCRIPT-

Depends on D5056

Partial backport of Core PR15948
https://github.com/bitcoin/bitcoin/pull/15948/commits/631940aab228ccca64c15e05d5953f40381a0ffc
https://github.com/bitcoin/bitcoin/pull/15948/commits/486c1eea863a41e597ae4fddc392f446f2518b4b

Test Plan:

ninja check

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix

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

Details

Provenance
nakihitoAuthored on Feb 26 2020, 00:22
jasonbcoxPushed on Mar 2 2020, 19:52
Reviewer
Restricted Owners Package
Differential Revision
D5373: scripted-diff: replace chainActive -> ::ChainActive()
Parents
rSTAGING8b0ad8e95656: refactoring: introduce unused ChainActive()
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/16708, tag: phabricator/base/16707, tag: phabricator/base/16703