diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-06-15 16:24:00 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-07-14 11:07:16 -0400 |
commit | d416ae560e46a4846a3fd5990b7d390d2ef30ec8 (patch) | |
tree | 3e859a51aba093050caabfc31ab873a27c16f39b /src/wallet/walletdb.cpp | |
parent | 2179dbcbcd0b9bef7ad9c907b85294b9a1bccf0f (diff) |
walletdb: Introduce WalletDatabase abstract class
Make WalletDatabase actually an abstract class and not just a typedef
for BerkeleyDatabase. Have BerkeleyDatabase inherit this class.
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 1478687bf9..8c409b40cd 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -1012,20 +1012,20 @@ bool IsWalletLoaded(const fs::path& wallet_path) } /** Return object for accessing database at specified path. */ -std::unique_ptr<BerkeleyDatabase> CreateWalletDatabase(const fs::path& path) +std::unique_ptr<WalletDatabase> CreateWalletDatabase(const fs::path& path) { std::string filename; return MakeUnique<BerkeleyDatabase>(GetWalletEnv(path, filename), std::move(filename)); } /** Return object for accessing dummy database with no read/write capabilities. */ -std::unique_ptr<BerkeleyDatabase> CreateDummyWalletDatabase() +std::unique_ptr<WalletDatabase> CreateDummyWalletDatabase() { return MakeUnique<BerkeleyDatabase>(); } /** Return object for accessing temporary in-memory database. */ -std::unique_ptr<BerkeleyDatabase> CreateMockWalletDatabase() +std::unique_ptr<WalletDatabase> CreateMockWalletDatabase() { return MakeUnique<BerkeleyDatabase>(std::make_shared<BerkeleyEnvironment>(), ""); } |