Skip to content

Commit 2179dbc

Browse files
committed
walletdb: Add BerkeleyDatabase::Open dummy function
Adds an Open function for the class abstraction that does nothing for now.
1 parent 71d28e7 commit 2179dbc

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/wallet/bdb.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@ BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const char* pszMode, bo
413413
}
414414
}
415415

416+
void BerkeleyDatabase::Open(const char* mode)
417+
{
418+
throw std::logic_error("BerkeleyDatabase does not implement Open. This function should not be called.");
419+
}
420+
416421
void BerkeleyBatch::Flush()
417422
{
418423
if (activeTxn)

src/wallet/bdb.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ class BerkeleyDatabase
117117

118118
~BerkeleyDatabase();
119119

120+
/** Open the database if it is not already opened.
121+
* Dummy function, doesn't do anything right now, but is needed for class abstraction */
122+
void Open(const char* mode);
123+
120124
/** Rewrite the entire database on disk, with the exception of key pszSkip if non-zero
121125
*/
122126
bool Rewrite(const char* pszSkip=nullptr);

0 commit comments

Comments
 (0)