Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 286 Lines • ▼ Show 20 Lines | public: | ||||
mutable CAmount nDebitCached; | mutable CAmount nDebitCached; | ||||
mutable CAmount nCreditCached; | mutable CAmount nCreditCached; | ||||
mutable CAmount nImmatureCreditCached; | mutable CAmount nImmatureCreditCached; | ||||
mutable CAmount nAvailableCreditCached; | mutable CAmount nAvailableCreditCached; | ||||
mutable CAmount nWatchDebitCached; | mutable CAmount nWatchDebitCached; | ||||
mutable CAmount nWatchCreditCached; | mutable CAmount nWatchCreditCached; | ||||
mutable CAmount nImmatureWatchCreditCached; | mutable CAmount nImmatureWatchCreditCached; | ||||
mutable CAmount nAvailableWatchCreditCached; | mutable CAmount nAvailableWatchCreditCached; | ||||
mutable CAmount nChangeCached; | mutable Amount nChangeCached; | ||||
CWalletTx() { Init(nullptr); } | CWalletTx() { Init(nullptr); } | ||||
CWalletTx(const CWallet *pwalletIn, CTransactionRef arg) | CWalletTx(const CWallet *pwalletIn, CTransactionRef arg) | ||||
: CMerkleTx(std::move(arg)) { | : CMerkleTx(std::move(arg)) { | ||||
Init(pwalletIn); | Init(pwalletIn); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | public: | ||||
//! filter decides which addresses will count towards the debit | //! filter decides which addresses will count towards the debit | ||||
CAmount GetDebit(const isminefilter &filter) const; | CAmount GetDebit(const isminefilter &filter) const; | ||||
CAmount GetCredit(const isminefilter &filter) const; | CAmount GetCredit(const isminefilter &filter) const; | ||||
CAmount GetImmatureCredit(bool fUseCache = true) const; | CAmount GetImmatureCredit(bool fUseCache = true) const; | ||||
CAmount GetAvailableCredit(bool fUseCache = true) const; | CAmount GetAvailableCredit(bool fUseCache = true) const; | ||||
CAmount GetImmatureWatchOnlyCredit(const bool &fUseCache = true) const; | CAmount GetImmatureWatchOnlyCredit(const bool &fUseCache = true) const; | ||||
CAmount GetAvailableWatchOnlyCredit(const bool &fUseCache = true) const; | CAmount GetAvailableWatchOnlyCredit(const bool &fUseCache = true) const; | ||||
CAmount GetChange() const; | Amount GetChange() const; | ||||
void GetAmounts(std::list<COutputEntry> &listReceived, | void GetAmounts(std::list<COutputEntry> &listReceived, | ||||
std::list<COutputEntry> &listSent, CAmount &nFee, | std::list<COutputEntry> &listSent, CAmount &nFee, | ||||
std::string &strSentAccount, | std::string &strSentAccount, | ||||
const isminefilter &filter) const; | const isminefilter &filter) const; | ||||
void GetAccountAmounts(const std::string &strAccount, CAmount &nReceived, | void GetAccountAmounts(const std::string &strAccount, CAmount &nReceived, | ||||
CAmount &nSent, CAmount &nFee, | CAmount &nSent, CAmount &nFee, | ||||
▲ Show 20 Lines • Show All 490 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Returns amount of debit if the input matches the filter, otherwise | * Returns amount of debit if the input matches the filter, otherwise | ||||
* returns 0 | * returns 0 | ||||
*/ | */ | ||||
CAmount GetDebit(const CTxIn &txin, const isminefilter &filter) const; | CAmount GetDebit(const CTxIn &txin, const isminefilter &filter) const; | ||||
isminetype IsMine(const CTxOut &txout) const; | isminetype IsMine(const CTxOut &txout) const; | ||||
CAmount GetCredit(const CTxOut &txout, const isminefilter &filter) const; | CAmount GetCredit(const CTxOut &txout, const isminefilter &filter) const; | ||||
bool IsChange(const CTxOut &txout) const; | bool IsChange(const CTxOut &txout) const; | ||||
CAmount GetChange(const CTxOut &txout) const; | Amount GetChange(const CTxOut &txout) const; | ||||
bool IsMine(const CTransaction &tx) const; | bool IsMine(const CTransaction &tx) const; | ||||
/** should probably be renamed to IsRelevantToMe */ | /** should probably be renamed to IsRelevantToMe */ | ||||
bool IsFromMe(const CTransaction &tx) const; | bool IsFromMe(const CTransaction &tx) const; | ||||
CAmount GetDebit(const CTransaction &tx, const isminefilter &filter) const; | CAmount GetDebit(const CTransaction &tx, const isminefilter &filter) const; | ||||
/** Returns whether all of the inputs match the filter */ | /** Returns whether all of the inputs match the filter */ | ||||
bool IsAllFromMe(const CTransaction &tx, const isminefilter &filter) const; | bool IsAllFromMe(const CTransaction &tx, const isminefilter &filter) const; | ||||
CAmount GetCredit(const CTransaction &tx, const isminefilter &filter) const; | CAmount GetCredit(const CTransaction &tx, const isminefilter &filter) const; | ||||
CAmount GetChange(const CTransaction &tx) const; | Amount GetChange(const CTransaction &tx) const; | ||||
void SetBestChain(const CBlockLocator &loc) override; | void SetBestChain(const CBlockLocator &loc) override; | ||||
DBErrors LoadWallet(bool &fFirstRunRet); | DBErrors LoadWallet(bool &fFirstRunRet); | ||||
DBErrors ZapWalletTx(std::vector<CWalletTx> &vWtx); | DBErrors ZapWalletTx(std::vector<CWalletTx> &vWtx); | ||||
DBErrors ZapSelectTx(std::vector<uint256> &vHashIn, | DBErrors ZapSelectTx(std::vector<uint256> &vHashIn, | ||||
std::vector<uint256> &vHashOut); | std::vector<uint256> &vHashOut); | ||||
bool SetAddressBook(const CTxDestination &address, | bool SetAddressBook(const CTxDestination &address, | ||||
▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines |