diff options
author | Carl Dong <contact@carldong.me> | 2022-03-10 22:13:58 -0500 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-03-15 16:43:31 +0100 |
commit | 382b692a503355df7347efd9c128aff465b5583e (patch) | |
tree | 8437d33c9cd659a3663df4e2dea064284e326fe2 /src/bitcoin-chainstate.cpp | |
parent | edabbc78a3bc272b2b802e1dbab73d6ed8e31e96 (diff) | |
download | bitcoin-382b692a503355df7347efd9c128aff465b5583e.tar.xz |
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.
Diffstat (limited to 'src/bitcoin-chainstate.cpp')
-rw-r--r-- | src/bitcoin-chainstate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp index 423fa79c6f..1247235660 100644 --- a/src/bitcoin-chainstate.cpp +++ b/src/bitcoin-chainstate.cpp @@ -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, }; |