mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
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:
@@ -25,6 +25,7 @@
|
||||
#include <node/chainstate.h>
|
||||
#include <scheduler.h>
|
||||
#include <script/sigcache.h>
|
||||
#include <util/chaintype.h>
|
||||
#include <util/thread.h>
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
@@ -52,7 +53,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
|
||||
// SETUP: Misc Globals
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
SelectParams(ChainType::MAIN);
|
||||
auto chainparams = CChainParams::Main();
|
||||
|
||||
kernel::Context kernel_context{};
|
||||
|
||||
Reference in New Issue
Block a user