CWallet: added SetNull() 247/head
authorsvost <svost@users.noreply.github.com>
Sat, 3 Oct 2015 22:37:57 +0000 (01:37 +0300)
committersvost <svost@users.noreply.github.com>
Sat, 3 Oct 2015 22:37:57 +0000 (01:37 +0300)
src/wallet.h

index 6071b91..8480b3b 100644 (file)
@@ -102,28 +102,27 @@ public:
 
     CWallet()
     {
-        nWalletVersion = FEATURE_BASE;
-        nWalletMaxVersion = FEATURE_BASE;
-        fFileBacked = false;
-        nMasterKeyMaxID = 0;
-        pwalletdbEncryption = NULL;
-        pwalletdbDecryption = NULL;
-        nOrderPosNext = 0;
-        nKernelsTried = 0;
-        nCoinDaysTried = 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;
         pwalletdbDecryption = NULL;
         nOrderPosNext = 0;
         nKernelsTried = 0;
         nCoinDaysTried = 0;
+        nTimeFirstKey = 0;
     }
 
     std::map<uint256, CWalletTx> mapWallet;