aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2014-06-04 15:00:58 -0400
committerJeff Garzik <jgarzik@bitpay.com>2014-06-04 15:00:58 -0400
commitb8ac6cdf53554b37de91f590b05a197259658a99 (patch)
tree99c7ef2080c53a9b86db6e5a5e095e96a33283db /src
parentc79897af319e01d0c84f970206747e320e246418 (diff)
parentd04fd3e2afaf9cdab21aa8f3abb5a5a2c48118cc (diff)
downloadbitcoin-b8ac6cdf53554b37de91f590b05a197259658a99.tar.xz
Merge pull request #4282 from jgarzik/fix-wallet-init
CWallet: fix nTimeFirstKey init, by making constructor init common code
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 d9d071c2b9..8e2917188a 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;