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.
-BEGIN VERIFY SCRIPT-
sed -i '/#include <chainparamsbase.h>/d' $( git grep -l 'chainparamsbase.h' | xargs grep -L 'CBaseChainParams\|CreateBaseChainParams\|SetupChainParamsBaseOptions\|BaseParams\|SelectBaseParams\|chainparamsbase.cpp' )
-END VERIFY SCRIPT-
Then the include was added where it was actually missing and was previously included indirectly.
This concludes backport of [[https://github.com/bitcoin/bitcoin/pull/27491 | core#27491]]
https://github.com/bitcoin/bitcoin/pull/27491/commits/e9ee8aaf3acdf6dce2b339916d4c602484570050
https://github.com/bitcoin/bitcoin/pull/27491/commits/d168458d1ff987e0d741c75ac1d4b63ae0cfb7e7
Depends on D17988