aboutsummaryrefslogtreecommitdiff
path: root/src/node/chainstate.cpp
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2022-08-16 23:32:55 -0400
committerRyan Ofsky <ryan@ofsky.org>2023-02-10 04:39:11 -0400
commitaadd7c5b9b43a38beaa954b4cb8c2fff55f2200f (patch)
treece5985441ccca16a902830c7e1472ad58d86a197 /src/node/chainstate.cpp
parent0352258148c51572426666d337c7b28d0033376c (diff)
refactor, validation: Add ChainstateManagerOpts db options
Use ChainstateManagerOpts struct to remove ArgsManager uses from validation.cpp. This commit does not change behavior.
Diffstat (limited to 'src/node/chainstate.cpp')
-rw-r--r--src/node/chainstate.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/node/chainstate.cpp b/src/node/chainstate.cpp
index fa521a9e03..4741c4c421 100644
--- a/src/node/chainstate.cpp
+++ b/src/node/chainstate.cpp
@@ -10,14 +10,12 @@
#include <consensus/params.h>
#include <logging.h>
#include <node/blockstorage.h>
-#include <node/database_args.h>
#include <node/caches.h>
#include <sync.h>
#include <threadsafety.h>
#include <tinyformat.h>
#include <txdb.h>
#include <uint256.h>
-#include <util/system.h>
#include <util/time.h>
#include <util/translation.h>
#include <validation.h>
@@ -67,11 +65,11 @@ ChainstateLoadResult LoadChainstate(ChainstateManager& chainman, const CacheSize
// fails if it's still open from the previous loop. Close it first:
pblocktree.reset();
pblocktree = std::make_unique<CBlockTreeDB>(DBParams{
- .path = gArgs.GetDataDirNet() / "blocks" / "index",
+ .path = chainman.m_options.datadir / "blocks" / "index",
.cache_bytes = static_cast<size_t>(cache_sizes.block_tree_db),
.memory_only = options.block_tree_db_in_memory,
.wipe_data = options.reindex,
- .options = [] { DBOptions options; node::ReadDatabaseArgs(gArgs, options); return options; }()});
+ .options = chainman.m_options.block_tree_db});
if (options.reindex) {
pblocktree->WriteReindexing(true);