aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.h
diff options
context:
space:
mode:
authorKiminuo <kiminuo@protonmail.com>2021-12-02 21:21:05 +0100
committerKiminuo <kiminuo@protonmail.com>2022-03-16 08:26:28 +0100
commit39b1763730177cd7d6a32fd9321da640b0d65e0e (patch)
treece8d7c83579101fb27062410ed27283ee76558b9 /src/wallet/db.h
parenta7e80449c0811b361cdaea39b6bab78ca5fbf668 (diff)
downloadbitcoin-39b1763730177cd7d6a32fd9321da640b0d65e0e.tar.xz
Replace use of `ArgsManager` with `DatabaseOptions`
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r--src/wallet/db.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 5825b00e3a..f09844c37e 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -16,6 +16,7 @@
#include <optional>
#include <string>
+class ArgsManager;
struct bilingual_str;
namespace wallet {
@@ -207,7 +208,12 @@ struct DatabaseOptions {
std::optional<DatabaseFormat> require_format;
uint64_t create_flags = 0;
SecureString create_passphrase;
- bool verify = true;
+
+ // Specialized options. Not every option is supported by every backend.
+ bool verify = true; //!< Check data integrity on load.
+ bool use_unsafe_sync = false; //!< Disable file sync for faster performance.
+ bool use_shared_memory = false; //!< Let other processes access the database.
+ int64_t max_log_mb = 100; //!< Max log size to allow before consolidating.
};
enum class DatabaseStatus {
@@ -227,6 +233,7 @@ enum class DatabaseStatus {
/** Recursively list database paths in directory. */
std::vector<fs::path> ListDatabases(const fs::path& path);
+void ReadDatabaseArgs(const ArgsManager& args, DatabaseOptions& options);
std::unique_ptr<WalletDatabase> MakeDatabase(const fs::path& path, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error);
fs::path BDBDataFile(const fs::path& path);