Page MenuHomePhabricator

Split non/kernel chainparams
ClosedPublic

Authored by PiRK on May 7 2024, 10:43.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6807143b114f: Split non/kernel chainparams
Summary

Moves chainparams code not using the ArgsManager to the kernel.

Subsequently use the kernel chainparams header now where possible in order to further decouple chainparams call sites from gArgs.

Make it possible for the Config object to optionnaly own the chainparams ard return the member rather than the global chainparams, and demo it in bitcoin-chainstate.

Note that the new kernel/chainparams.cpp needs to be in the common lib (as opposed to the server lib that has all the other kernel/* components) for bitcoin-tx to not fail linking.

This concludes backport of core#26177
https://github.com/bitcoin/bitcoin/pull/26177/commits/382b692a503355df7347efd9c128aff465b5583e

Test Plan
cmake .. -GNinja -DBUILD_BITCOIN_CHAINSTATE=ON -DBUILD_BITCOIN_CHRONIK=ON
ninja all check-all