aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/wallet.h b/src/wallet.h
index ca7cf67317..78f055a604 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -74,11 +74,13 @@ public:
bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase);
bool EncryptWallet(const SecureString& strWalletPassphrase);
+ void MarkDirty();
bool AddToWallet(const CWalletTx& wtxIn);
- bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate = false);
+ bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate = false, bool fFindBlock = false);
bool EraseFromWallet(uint256 hash);
void WalletUpdateSpent(const CTransaction& prevout);
int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false);
+ int ScanForWalletTransaction(const uint256& hashTx);
void ReacceptWalletTransactions();
void ResendWalletTransactions();
int64 GetBalance() const;
@@ -92,11 +94,13 @@ public:
bool NewKeyPool();
bool TopUpKeyPool();
+ int64 AddReserveKey(const CKeyPool& keypool);
void ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool);
void KeepKey(int64 nIndex);
void ReturnKey(int64 nIndex);
bool GetKeyFromPool(std::vector<unsigned char> &key, bool fAllowReuse=true);
int64 GetOldestKeyPoolTime();
+ void GetAllReserveAddresses(std::set<CBitcoinAddress>& setAddress);
bool IsMine(const CTxIn& txin) const;
int64 GetDebit(const CTxIn& txin) const;
@@ -243,9 +247,10 @@ public:
//
class CWalletTx : public CMerkleTx
{
-public:
+private:
const CWallet* pwallet;
+public:
std::vector<CMerkleTx> vtxPrev;
std::map<std::string, std::string> mapValue;
std::vector<std::pair<std::string, std::string> > vOrderForm;
@@ -389,6 +394,12 @@ public:
fChangeCached = false;
}
+ void BindWallet(CWallet *pwalletIn)
+ {
+ pwallet = pwalletIn;
+ MarkDirty();
+ }
+
void MarkSpent(unsigned int nOut)
{
if (nOut >= vout.size())