aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2014-06-03 12:55:33 -0400
committerWladimir J. van der Laan <[email protected]>2014-06-06 19:26:15 +0200
commit7ccadd41999c40a459655da3c66ff78c2f86c773 (patch)
treea525f0d96a6d21cfab3f2a26a3d131e1e2282c90 /src
parentgitian: upgrade OpenSSL to 1.0.1h (diff)
downloaddiscoin-7ccadd41999c40a459655da3c66ff78c2f86c773.tar.xz
discoin-7ccadd41999c40a459655da3c66ff78c2f86c773.zip
CWallet: fix nTimeFirstKey init, by making constructor init common code
Don't repeat yourself etc. Rebased-From: d04fd3e Rebased-By: Wladimir J. van der Laan <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/wallet.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/wallet.h b/src/wallet.h
index 5a9b7ad8f..88ee87196 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -143,27 +143,26 @@ public:
CWallet()
{
- nWalletVersion = FEATURE_BASE;
- nWalletMaxVersion = FEATURE_BASE;
- fFileBacked = false;
- nMasterKeyMaxID = 0;
- pwalletdbEncryption = NULL;
- nOrderPosNext = 0;
- nNextResend = 0;
- nLastResend = 0;
- nTimeFirstKey = 0;
+ SetNull();
}
CWallet(std::string strWalletFileIn)
{
- nWalletVersion = FEATURE_BASE;
- nWalletMaxVersion = FEATURE_BASE;
+ SetNull();
+
strWalletFile = strWalletFileIn;
fFileBacked = true;
+ }
+ void SetNull()
+ {
+ nWalletVersion = FEATURE_BASE;
+ nWalletMaxVersion = FEATURE_BASE;
+ fFileBacked = false;
nMasterKeyMaxID = 0;
pwalletdbEncryption = NULL;
nOrderPosNext = 0;
nNextResend = 0;
nLastResend = 0;
+ nTimeFirstKey = 0;
}
std::map<uint256, CWalletTx> mapWallet;