Page MenuHomePhabricator

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

Authored by nakihito on Feb 28 2020, 22:15.

Details

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

Diff Detail

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

Event Timeline

Owners added a reviewer: Restricted Owners Package.Feb 28 2020, 22:15

[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.

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