refactor: Replace string chain name constants with ChainTypes

This commit effectively moves the definition of these constants
out of the chainparamsbase to their own file.

Using the ChainType enums provides better type safety compared to
passing around strings.

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.
This commit is contained in:
TheCharlatan
2023-04-17 22:20:59 +02:00
parent 401453df41
commit ba8fc7d788
78 changed files with 288 additions and 229 deletions

View File

@ -91,7 +91,7 @@ static std::optional<int> WalletAppInit(ArgsManager& args, int argc, char* argv[
return EXIT_FAILURE;
}
// Check for chain settings (Params() calls are only valid after this clause)
SelectParams(args.GetChainName());
SelectParams(args.GetChainType());
return std::nullopt;
}