aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-chainstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bitcoin-chainstate.cpp')
-rw-r--r--src/bitcoin-chainstate.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp
index d972b71a65..abe3af70c3 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,10 +82,11 @@ 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,
};
- ChainstateManager chainman{chainman_opts};
+ ChainstateManager chainman{chainman_opts, {}};
node::CacheSizes cache_sizes;
cache_sizes.block_tree_db = 2 << 20;