diff options
author | Jeff Garzik <jgarzik@bitpay.com> | 2013-06-10 09:36:29 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@bitpay.com> | 2013-06-10 09:36:29 -0400 |
commit | 3869fb89b60091281b43a35921057ba3f43c18f0 (patch) | |
tree | 3510aec7ccc74db41f25393f929db896f087cfea /src/wallet.h | |
parent | f59530ce6eb5a889e6eb750024ddb20e7b0df9d7 (diff) |
Wallet: store key creation time. Calculate whole-wallet birthday.
This also encapsulate wallet-read state information into CWalletScanState.
Diffstat (limited to 'src/wallet.h')
-rw-r--r-- | src/wallet.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wallet.h b/src/wallet.h index 674bae66dd..a0688b8a02 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -123,6 +123,8 @@ public: std::set<COutPoint> setLockedCoins; + int64 nTimeFirstKey; + // check whether we are allowed to upgrade (or already support) to the named feature bool CanSupportFeature(enum WalletFeature wf) { return nWalletMaxVersion >= wf; } @@ -138,14 +140,14 @@ public: // Generate a new key CPubKey GenerateNewKey(); // Adds a key to the store, and saves it to disk. - bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey); + bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey, int64 nCreateTime = 0); // Adds a key to the store, without saving it to disk (used by LoadWallet) bool LoadKey(const CKey& key, const CPubKey &pubkey) { return CCryptoKeyStore::AddKeyPubKey(key, pubkey); } bool LoadMinVersion(int nVersion) { nWalletVersion = nVersion; nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); return true; } // Adds an encrypted key to the store, and saves it to disk. - bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret); + bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret, int64 nCreateTime = 0); // Adds an encrypted key to the store, without saving it to disk (used by LoadWallet) bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret); bool AddCScript(const CScript& redeemScript); |