mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
Split non/kernel chainparams
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.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
//
|
||||
// It is part of the libbitcoinkernel project.
|
||||
|
||||
#include <kernel/chainparams.h>
|
||||
#include <kernel/checks.h>
|
||||
#include <kernel/context.h>
|
||||
#include <kernel/validation_cache_sizes.h>
|
||||
@@ -52,7 +53,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
// SETUP: Misc Globals
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
const CChainParams& chainparams = Params();
|
||||
auto chainparams = CChainParams::Main();
|
||||
|
||||
kernel::Context kernel_context{};
|
||||
// We can't use a goto here, but we can use an assert since none of the
|
||||
@@ -81,7 +82,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
// SETUP: Chainstate
|
||||
const ChainstateManager::Options chainman_opts{
|
||||
.chainparams = chainparams,
|
||||
.chainparams = *chainparams,
|
||||
.datadir = gArgs.GetDataDirNet(),
|
||||
.adjusted_time_callback = NodeClock::now,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user