diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2022-08-16 23:32:55 -0400 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2023-02-10 04:39:11 -0400 |
commit | 0352258148c51572426666d337c7b28d0033376c (patch) | |
tree | fac9e1484d8c25cfa64b1869c866e82b371c10b3 /src/txdb.cpp | |
parent | c00fa1a7341d3f47f992e0beb043da655cbca777 (diff) | |
download | bitcoin-0352258148c51572426666d337c7b28d0033376c.tar.xz |
refactor, txdb: Use DBParams struct in CBlockTreeDB
Use DBParams struct to remove ArgsManager uses from txdb.
To reduce size of this commit, this moves references to gArgs variable out of
txdb.cpp to calling code in chainstate.cpp. But these moves are temporary. The
gArgs references in chainstate.cpp are moved out to calling code in init.cpp in
later commits.
This commit does not change behavior.
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r-- | src/txdb.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp index 5803bc7b31..7257fb4959 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -6,7 +6,6 @@ #include <txdb.h> #include <chain.h> -#include <node/database_args.h> #include <pow.h> #include <random.h> #include <shutdown.h> @@ -176,14 +175,6 @@ size_t CCoinsViewDB::EstimateSize() const return m_db->EstimateSize(DB_COIN, uint8_t(DB_COIN + 1)); } -CBlockTreeDB::CBlockTreeDB(size_t nCacheSize, bool fMemory, bool fWipe) : CDBWrapper{DBParams{ - .path = gArgs.GetDataDirNet() / "blocks" / "index", - .cache_bytes = nCacheSize, - .memory_only = fMemory, - .wipe_data = fWipe, - .options = [] { DBOptions options; node::ReadDatabaseArgs(gArgs, options); return options; }()}} { -} - bool CBlockTreeDB::ReadBlockFileInfo(int nFile, CBlockFileInfo &info) { return Read(std::make_pair(DB_BLOCK_FILES, nFile), info); } |