CWallet: fix nTimeFirstKey init, by making constructor init common code
Don't repeat yourself etc.
This commit is contained in:
parent
06a4334a2f
commit
d04fd3e2af
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;
|
||||
|
||||
CWallet()
|
||||
{
|
||||
SetNull();
|
||||
}
|
||||
CWallet(std::string strWalletFileIn)
|
||||
{
|
||||
SetNull();
|
||||
|
||||
strWalletFile = strWalletFileIn;
|
||||
fFileBacked = true;
|
||||
}
|
||||
void SetNull()
|
||||
{
|
||||
nWalletVersion = FEATURE_BASE;
|
||||
nWalletMaxVersion = FEATURE_BASE;
|
||||
|
@ -153,18 +164,6 @@ public:
|
|||
nLastResend = 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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue