diff options
Diffstat (limited to 'src/wallet.h')
-rw-r--r-- | src/wallet.h | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/src/wallet.h b/src/wallet.h index b1ee40ab90..3d9387ff82 100644 --- a/src/wallet.h +++ b/src/wallet.h @@ -5,6 +5,7 @@ #ifndef BITCOIN_WALLET_H #define BITCOIN_WALLET_H +#include "main.h" #include "bignum.h" #include "key.h" #include "keystore.h" @@ -25,6 +26,34 @@ enum WalletFeature FEATURE_LATEST = 60000 }; + +/** A key pool entry */ +class CKeyPool +{ +public: + int64 nTime; + std::vector<unsigned char> vchPubKey; + + CKeyPool() + { + nTime = GetTime(); + } + + CKeyPool(const std::vector<unsigned char>& vchPubKeyIn) + { + nTime = GetTime(); + vchPubKey = vchPubKeyIn; + } + + IMPLEMENT_SERIALIZE + ( + if (!(nType & SER_GETHASH)) + READWRITE(nVersion); + READWRITE(nTime); + READWRITE(vchPubKey); + ) +}; + /** A CWallet is an extension of a keystore, which also maintains a set of transactions and balances, * and provides the ability to create new transactions. */ @@ -196,11 +225,7 @@ public: } return nChange; } - void SetBestChain(const CBlockLocator& loc) - { - CWalletDB walletdb(strWalletFile); - walletdb.WriteBestBlock(loc); - } + void SetBestChain(const CBlockLocator& loc); int LoadWallet(bool& fFirstRunRet); // bool BackupWallet(const std::string& strDest); |