CWallet: fix nTimeFirstKey init, by making constructor init common code

Don't repeat yourself etc.
This commit is contained in:
Jeff Garzik 2014-06-03 12:55:33 -04:00
parent 06a4334a2f
commit d04fd3e2af

View File

@ -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;