Merge pull request #4282 from jgarzik/fix-wallet-init
CWallet: fix nTimeFirstKey init, by making constructor init common code
This commit is contained in:
commit
b8ac6cdf53
1 changed files with 11 additions and 12 deletions
23
src/wallet.h
23
src/wallet.h
|
@ -142,6 +142,17 @@ public:
|
||||||
unsigned int nMasterKeyMaxID;
|
unsigned int nMasterKeyMaxID;
|
||||||
|
|
||||||
CWallet()
|
CWallet()
|
||||||
|
{
|
||||||
|
SetNull();
|
||||||
|
}
|
||||||
|
CWallet(std::string strWalletFileIn)
|
||||||
|
{
|
||||||
|
SetNull();
|
||||||
|
|
||||||
|
strWalletFile = strWalletFileIn;
|
||||||
|
fFileBacked = true;
|
||||||
|
}
|
||||||
|
void SetNull()
|
||||||
{
|
{
|
||||||
nWalletVersion = FEATURE_BASE;
|
nWalletVersion = FEATURE_BASE;
|
||||||
nWalletMaxVersion = FEATURE_BASE;
|
nWalletMaxVersion = FEATURE_BASE;
|
||||||
|
@ -153,18 +164,6 @@ public:
|
||||||
nLastResend = 0;
|
nLastResend = 0;
|
||||||
nTimeFirstKey = 0;
|
nTimeFirstKey = 0;
|
||||||
}
|
}
|
||||||
CWallet(std::string strWalletFileIn)
|
|
||||||
{
|
|
||||||
nWalletVersion = FEATURE_BASE;
|
|
||||||
nWalletMaxVersion = FEATURE_BASE;
|
|
||||||
strWalletFile = strWalletFileIn;
|
|
||||||
fFileBacked = true;
|
|
||||||
nMasterKeyMaxID = 0;
|
|
||||||
pwalletdbEncryption = NULL;
|
|
||||||
nOrderPosNext = 0;
|
|
||||||
nNextResend = 0;
|
|
||||||
nLastResend = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::map<uint256, CWalletTx> mapWallet;
|
std::map<uint256, CWalletTx> mapWallet;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue