aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/walletdb.cpp
diff options
context:
space:
mode:
authorAndrew Chow <github@achow101.com>2023-05-15 16:14:43 -0400
committerAndrew Chow <github@achow101.com>2023-05-15 16:14:43 -0400
commit0282b2126dcc1216a25417db0716a3a28489b72d (patch)
treef6257580498ed000b471ba31a1fa391d19f16972 /src/wallet/walletdb.cpp
parentd7700d3a26478d9b1648463c188648c7047b1c60 (diff)
downloadbitcoin-0282b2126dcc1216a25417db0716a3a28489b72d.tar.xz
walletdb: Remove unused CreateMockWalletDatabase
This has been superseded by the MockableDatabase. Remove to avoid confusion as to which type of mock database to use for testing.
Diffstat (limited to 'src/wallet/walletdb.cpp')
-rw-r--r--src/wallet/walletdb.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index 072357022e..e99ac53b16 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -1262,38 +1262,4 @@ std::unique_ptr<WalletDatabase> MakeDatabase(const fs::path& path, const Databas
status = DatabaseStatus::FAILED_BAD_FORMAT;
return nullptr;
}
-
-/** Return object for accessing temporary in-memory database. */
-std::unique_ptr<WalletDatabase> CreateMockWalletDatabase(DatabaseOptions& options)
-{
-
- std::optional<DatabaseFormat> format;
- if (options.require_format) format = options.require_format;
- if (!format) {
-#ifdef USE_BDB
- format = DatabaseFormat::BERKELEY;
-#endif
-#ifdef USE_SQLITE
- format = DatabaseFormat::SQLITE;
-#endif
- }
-
- if (format == DatabaseFormat::SQLITE) {
-#ifdef USE_SQLITE
- return std::make_unique<SQLiteDatabase>(":memory:", "", options, true);
-#endif
- assert(false);
- }
-
-#ifdef USE_BDB
- return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), "", options);
-#endif
- assert(false);
-}
-
-std::unique_ptr<WalletDatabase> CreateMockWalletDatabase()
-{
- DatabaseOptions options;
- return CreateMockWalletDatabase(options);
-}
} // namespace wallet