aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-04-15 22:10:54 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-04-17 20:00:55 +0200
commited6d0b5f852dc5f1c9407abecb5a9c6a7e42b4b2 (patch)
tree763b840f2619af642469d3894b88b682134f4425 /src/wallet.h
parentb97d54355e8239273b50c54dbedfde16ed82fd73 (diff)
Remove headers.h
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h35
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);