Skip to content

Commit a52f1d1

Browse files
committed
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.
1 parent a78c229 commit a52f1d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wallet/walletdb.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,9 +1188,9 @@ std::unique_ptr<WalletDatabase> CreateDummyWalletDatabase()
11881188
/** Return object for accessing temporary in-memory database. */
11891189
std::unique_ptr<WalletDatabase> CreateMockWalletDatabase()
11901190
{
1191-
#ifdef USE_BDB
1192-
return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), "");
1193-
#elif USE_SQLITE
1191+
#ifdef USE_SQLITE
11941192
return std::make_unique<SQLiteDatabase>("", "", true);
1193+
#elif USE_BDB
1194+
return std::make_unique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), "");
11951195
#endif
11961196
}

0 commit comments

Comments
 (0)