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 <laanwj@gmail.com>
This commit is contained in:
parent
8465a714f8
commit
84196ee050
23
src/wallet.h
23
src/wallet.h
|
@ -329,6 +329,17 @@ public:
|
|||
unsigned int nMasterKeyMaxID;
|
||||
|
||||
CWallet()
|
||||
{
|
||||
SetNull();
|
||||
}
|
||||
CWallet(std::string strWalletFileIn)
|
||||
{
|
||||
SetNull();
|
||||
|
||||
strWalletFile = strWalletFileIn;
|
||||
fFileBacked = true;
|
||||
}
|
||||
void SetNull()
|
||||
{
|
||||
nWalletVersion = FEATURE_BASE;
|
||||
nWalletMaxVersion = FEATURE_BASE;
|
||||
|
@ -340,18 +351,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