From ed6d0b5f852dc5f1c9407abecb5a9c6a7e42b4b2 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sun, 15 Apr 2012 22:10:54 +0200 Subject: Remove headers.h --- src/wallet.h | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'src/wallet.h') 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 vchPubKey; + + CKeyPool() + { + nTime = GetTime(); + } + + CKeyPool(const std::vector& 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); -- cgit v1.2.3