X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fwallet.h;h=622ff974b9b0c0de538988f00f27d32ddf723fad;hb=0b807a417f4a15f3e37ae35e70a72e6169f01c02;hp=3fdef50c0332b9563d7b81c737d4cae120e72d97;hpb=2d36b60f9278f2b6fedadbb3b5f29e19244f5cef;p=novacoin.git diff --git a/src/wallet.h b/src/wallet.h index 3fdef50..622ff97 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -25,6 +25,8 @@ private: CWalletDB *pwalletdbEncryption; + int nWalletVersion; + public: mutable CCriticalSection cs_wallet; @@ -33,18 +35,21 @@ public: std::set setKeyPool; + typedef std::map MasterKeyMap; MasterKeyMap mapMasterKeys; unsigned int nMasterKeyMaxID; CWallet() { + nWalletVersion = 0; fFileBacked = false; nMasterKeyMaxID = 0; pwalletdbEncryption = NULL; } CWallet(std::string strWalletFileIn) { + nWalletVersion = 0; strWalletFile = strWalletFileIn; fFileBacked = true; nMasterKeyMaxID = 0; @@ -66,6 +71,8 @@ public: // Adds a key to the store, without saving it to disk (used by LoadWallet) bool LoadKey(const CKey& key) { return CCryptoKeyStore::AddKey(key); } + bool LoadMinVersion(int nVersion) { nWalletVersion = nVersion; return true; } + // Adds an encrypted key to the store, and saves it to disk. bool AddCryptedKey(const std::vector &vchPubKey, const std::vector &vchCryptedSecret); // Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) @@ -206,6 +213,8 @@ public: bool GetTransaction(const uint256 &hashTx, CWalletTx& wtx); bool SetDefaultKey(const std::vector &vchPubKey); + + bool SetMinVersion(int nVersion, CWalletDB* pwalletdbIn = NULL); };