Page MenuHomePhabricator

refactor: Create chaintype files
AcceptedPublic

Authored by PiRK on Thu, Apr 24, 10:57.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

This is the first of a number of commits with the goal of moving the
chain type definitions out of chainparamsbase to their own file and
implementing them as enums instead of constant strings. The goal is to
allow the kernel chainparams to no longer include chainparamsbase.

The commit is part of an ongoing effort to decouple the libbitcoinkernel
library from the ArgsManager and other functionality that should not be
part of the kernel library.

Introduce ChainType getters for ArgsManager
These are introduced for the next commit where the usage of the
ChainType is adopted throughout the code.

This is a partial backport of core#27491
https://github.com/bitcoin/bitcoin/pull/27491/commits/bfc21c31b2186f7d30fc9a9ca7d6887ab61c6fb9
https://github.com/bitcoin/bitcoin/pull/27491/commits/401453df419af35957ec711423ac3d93ad512fe8

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: TheCharlatan <seb.kung@gmail.com>

Test Plan

ninja all check-all