aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-09-09 08:42:30 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2017-06-06 21:17:09 +0000
commitb124cf04ea47e1eda60bbc26a9690a9715c6b23f (patch)
treea6efe783bcbcf8b37736d20de0aa365ae352e161 /src/wallet/db.h
parent19b3648bb52d27c3a9674159d71726b73fe532d9 (diff)
Wallet: Replace pwalletMain with a vector of wallet pointers
Diffstat (limited to 'src/wallet/db.h')
-rw-r--r--src/wallet/db.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/wallet/db.h b/src/wallet/db.h
index 1a583c3ce9..a2ede99d1b 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -93,13 +93,13 @@ class CWalletDBWrapper
friend class CDB;
public:
/** Create dummy DB handle */
- CWalletDBWrapper(): env(nullptr)
+ CWalletDBWrapper() : nLastSeen(0), nLastFlushed(0), nLastWalletUpdate(0), env(nullptr)
{
}
/** Create DB handle to real database */
- CWalletDBWrapper(CDBEnv *env_in, const std::string &strFile_in):
- env(env_in), strFile(strFile_in)
+ CWalletDBWrapper(CDBEnv *env_in, const std::string &strFile_in) :
+ nLastSeen(0), nLastFlushed(0), nLastWalletUpdate(0), env(env_in), strFile(strFile_in)
{
}
@@ -120,13 +120,16 @@ public:
void Flush(bool shutdown);
void IncrementUpdateCounter();
- unsigned int GetUpdateCounter();
+
+ std::atomic<unsigned int> nUpdateCounter;
+ unsigned int nLastSeen;
+ unsigned int nLastFlushed;
+ int64_t nLastWalletUpdate;
private:
/** BerkeleyDB specific */
CDBEnv *env;
std::string strFile;
- std::atomic<unsigned int> nUpdateCounter;
/** Return whether this database handle is a dummy for testing.
* Only to be used at a low level, application should ideally not care