diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-08 13:34:47 +0000 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-04-20 17:15:31 +0200 |
commit | be9e1a968debbb7ede8ed50e9288a62ff15d1e1e (patch) | |
tree | 48f4136d2e6cedfba9b2a00b114e96ef6e034ebe /src/wallet/db.h | |
parent | 071c95570b8e2ee5c2a4aed8b86b9b14f8e75578 (diff) |
wallet: Reduce references to global bitdb environment
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r-- | src/wallet/db.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h index 892c8d33c3..dfce3d76cd 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -116,6 +116,10 @@ public: */ std::string GetName() const { return strFile; } + /** Make sure all changes are flushed to disk. + */ + void Flush(bool shutdown); + /** Return whether this database handle is a dummy for testing. * Only to be used at a low level, application should ideally not care * about this. @@ -138,6 +142,7 @@ protected: DbTxn* activeTxn; bool fReadOnly; bool fFlushOnClose; + CDBEnv *env; explicit CDB(CWalletDBWrapper& dbw, const char* pszMode = "r+", bool fFlushOnCloseIn=true); ~CDB() { Close(); } |