walletdb: Add BerkeleyDatabase::Open dummy function

Adds an Open function for the class abstraction that does nothing for
now.
This commit is contained in:
Andrew Chow 2020-06-19 20:55:07 -04:00
parent 71d28e7cdc
commit 2179dbcbcd
2 changed files with 9 additions and 0 deletions

View File

@ -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)

View File

@ -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);