HomePhabricator

Fix chainparams includes

Description

Fix chainparams includes

Summary:
The unused includes where found by applying this scripted diff which removes the chainparamsbase header in all files where it is included, but not used. This is done by filtering against all defined symbols of the header as well as its respective .cpp file.

sed -i '/#include <chainparamsbase.h>/d' $( git grep -l 'chainparamsbase.h' | xargs grep -L 'CBaseChainParams\|CreateBaseChainParams\|SetupChainParamsBaseOptions\|BaseParams\|SelectBaseParams\|chainparamsbase.cpp' )

Then the #include was added where it was actually missing and was previously included indirectly.

This concludes backport of core#27491
https://github.com/bitcoin/bitcoin/pull/27491/commits/e9ee8aaf3acdf6dce2b339916d4c602484570050
https://github.com/bitcoin/bitcoin/pull/27491/commits/d168458d1ff987e0d741c75ac1d4b63ae0cfb7e7

Depends on D17988

Test Plan: ninja all check-all bench-bitcoin bitcoin-fuzzers

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
TheCharlatan <seb.kung@gmail.com>Authored on Apr 18 2023, 11:40
PiRKCommitted on Sat, Apr 26, 12:05
PiRKPushed on Sat, Apr 26, 12:05
Reviewer
Restricted Project
Differential Revision
D17989: Fix chainparams includes
Parents
rABCc74463aa8e92: refactor: Replace string chain name constants with ChainTypes
Branches
Unknown
Tags
Unknown

Event Timeline