wallet: Reduce references to global bitdb environment

This commit is contained in:
Wladimir J. van der Laan
2017-03-08 13:34:47 +00:00
parent 071c95570b
commit be9e1a968d
3 changed files with 48 additions and 33 deletions

View File

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