diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-10-22 17:33:24 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-10-22 17:49:43 -0400 |
commit | a52f1d13409e4ef46277596ec13fa8b421fa1329 (patch) | |
tree | 2263823959ad166697148be6bb3ab428dab0b284 /src/wallet/walletdb.cpp | |
parent | a78c2298080f173d0266e708267458a72eb2f600 (diff) |
walletdb: Use SQLiteDatabase for mock wallet databases
Default to SQLiteDatabase instead of BerkeleyDatabase for
CreateDummyWalletDatabase. Most tests already use descriptor wallets and
the mock db doesn't really matter for tests. The tests where it does
matter will make the db directly.
Diffstat (limited to 'src/wallet/walletdb.cpp')
-rw-r--r-- | src/wallet/walletdb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index a6839f1f78..c920d4af51 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -1188,9 +1188,9 @@ std::unique_ptr<WalletDatabase> CreateDummyWalletDatabase() /** Return object for accessing temporary in-memory database. */ std::unique_ptr<WalletDatabase> CreateMockWalletDatabase() { -#ifdef USE_BDB - return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), ""); -#elif USE_SQLITE +#ifdef USE_SQLITE return std::make_unique<SQLiteDatabase>("", "", true); +#elif USE_BDB + return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), ""); #endif } |