aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/wallet.h b/src/wallet.h
index 36b3608fb0..d47416d272 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -64,6 +64,19 @@ public:
)
};
+/** Address book data */
+class CAddressBookData
+{
+public:
+ std::string name;
+ std::string purpose;
+
+ CAddressBookData()
+ {
+ purpose = "unknown";
+ }
+};
+
/** 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.
*/
@@ -80,6 +93,9 @@ private:
// the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded
int nWalletMaxVersion;
+ int64 nNextResend;
+ int64 nLastResend;
+
public:
mutable CCriticalSection cs_wallet;
@@ -101,6 +117,8 @@ public:
nMasterKeyMaxID = 0;
pwalletdbEncryption = NULL;
nOrderPosNext = 0;
+ nNextResend = 0;
+ nLastResend = 0;
}
CWallet(std::string strWalletFileIn)
{
@@ -111,13 +129,15 @@ public:
nMasterKeyMaxID = 0;
pwalletdbEncryption = NULL;
nOrderPosNext = 0;
+ nNextResend = 0;
+ nLastResend = 0;
}
std::map<uint256, CWalletTx> mapWallet;
int64 nOrderPosNext;
std::map<uint256, int> mapRequestCount;
- std::map<CTxDestination, std::string> mapAddressBook;
+ std::map<CTxDestination, CAddressBookData> mapAddressBook;
CPubKey vchDefaultKey;
@@ -195,7 +215,7 @@ public:
std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false);
bool NewKeyPool();
- bool TopUpKeyPool();
+ bool TopUpKeyPool(unsigned int kpSize = 0);
int64 AddReserveKey(const CKeyPool& keypool);
void ReserveKeyFromKeyPool(int64& nIndex, CKeyPool& keypool);
void KeepKey(int64 nIndex);
@@ -207,6 +227,8 @@ public:
std::set< std::set<CTxDestination> > GetAddressGroupings();
std::map<CTxDestination, int64> GetAddressBalances();
+ std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
+
bool IsMine(const CTxIn& txin) const;
int64 GetDebit(const CTxIn& txin) const;
bool IsMine(const CTxOut& txout) const
@@ -274,9 +296,9 @@ public:
DBErrors LoadWallet(bool& fFirstRunRet);
- bool SetAddressBookName(const CTxDestination& address, const std::string& strName);
+ bool SetAddressBook(const CTxDestination& address, const std::string& strName, const std::string& purpose);
- bool DelAddressBookName(const CTxDestination& address);
+ bool DelAddressBook(const CTxDestination& address);
void UpdatedTransaction(const uint256 &hashTx);
@@ -292,7 +314,7 @@ public:
}
}
- int GetKeyPoolSize()
+ unsigned int GetKeyPoolSize()
{
return setKeyPool.size();
}