refactor, dbwrapper: Add DBParams and DBOptions structs

Add DBParams and DBOptions structs to remove ArgsManager uses from dbwrapper.

To reduce size of this commit, this moves references to gArgs variable out of
dbwrapper.cpp to calling code in txdb.cpp. But these moves are temporary. The
gArgs references in txdb.cpp are moved out to calling code in init.cpp in later
commits.

This commit does not change behavior.
This commit is contained in:
Ryan Ofsky
2022-08-16 23:32:55 -04:00
parent 4f841cbb81
commit 2eaeded37f
8 changed files with 115 additions and 41 deletions

15
src/node/database_args.h Normal file
View File

@@ -0,0 +1,15 @@
// Copyright (c) 2022 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_NODE_DATABASE_ARGS_H
#define BITCOIN_NODE_DATABASE_ARGS_H
class ArgsManager;
struct DBOptions;
namespace node {
void ReadDatabaseArgs(const ArgsManager& args, DBOptions& options);
} // namespace node
#endif // BITCOIN_NODE_DATABASE_ARGS_H