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.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/wallet/bdb.h b/src/wallet/bdb.h
index e54776fc0d..52cd9d92df 100644
--- a/src/wallet/bdb.h
+++ b/src/wallet/bdb.h
@@ -115,12 +115,7 @@ public:
assert(inserted.second);
}
- ~BerkeleyDatabase() {
- if (env) {
- size_t erased = env->m_databases.erase(strFile);
- assert(erased == 1);
- }
- }
+ ~BerkeleyDatabase();
/** Rewrite the entire database on disk, with the exception of key pszSkip if non-zero
*/
@@ -130,9 +125,13 @@ public:
*/
bool Backup(const std::string& strDest) const;
- /** Make sure all changes are flushed to disk.
+ /** Make sure all changes are flushed to database file.
+ */
+ void Flush();
+ /** Flush to the database file and close the database.
+ * Also close the environment if no other databases are open in it.
*/
- void Flush(bool shutdown);
+ void Close();
/* flush the wallet passively (TRY_LOCK)
ideal to be called periodically */
bool PeriodicFlush();