aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/bdb.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/bdb.h')
-rw-r--r--src/wallet/bdb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/bdb.h b/src/wallet/bdb.h
index 52cd9d92df..9c4d6afa87 100644
--- a/src/wallet/bdb.h
+++ b/src/wallet/bdb.h
@@ -121,6 +121,11 @@ public:
*/
bool Rewrite(const char* pszSkip=nullptr);
+ /** Indicate the a new database user has began using the database. */
+ void AddRef();
+ /** Indicate that database user has stopped using the database and that it could be flushed or closed. */
+ void RemoveRef();
+
/** Back up the entire database to a file.
*/
bool Backup(const std::string& strDest) const;
@@ -212,6 +217,7 @@ protected:
bool fReadOnly;
bool fFlushOnClose;
BerkeleyEnvironment *env;
+ BerkeleyDatabase& m_database;
public:
explicit BerkeleyBatch(BerkeleyDatabase& database, const char* pszMode = "r+", bool fFlushOnCloseIn=true);