From 2179dbcbcd0b9bef7ad9c907b85294b9a1bccf0f Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Fri, 19 Jun 2020 20:55:07 -0400 Subject: walletdb: Add BerkeleyDatabase::Open dummy function Adds an Open function for the class abstraction that does nothing for now. --- src/wallet/bdb.cpp | 5 +++++ src/wallet/bdb.h | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'src/wallet') diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index 8ca4991f04..06ee9ae5ee 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -413,6 +413,11 @@ BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const char* pszMode, bo } } +void BerkeleyDatabase::Open(const char* mode) +{ + throw std::logic_error("BerkeleyDatabase does not implement Open. This function should not be called."); +} + void BerkeleyBatch::Flush() { if (activeTxn) diff --git a/src/wallet/bdb.h b/src/wallet/bdb.h index 9c4d6afa87..bbaeefa414 100644 --- a/src/wallet/bdb.h +++ b/src/wallet/bdb.h @@ -117,6 +117,10 @@ public: ~BerkeleyDatabase(); + /** Open the database if it is not already opened. + * Dummy function, doesn't do anything right now, but is needed for class abstraction */ + void Open(const char* mode); + /** Rewrite the entire database on disk, with the exception of key pszSkip if non-zero */ bool Rewrite(const char* pszSkip=nullptr); -- cgit v1.2.3