aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-06-25 14:39:36 -0400
committerJohn Newbery <john@johnnewbery.com>2018-06-28 17:50:36 -0400
commit4279da47855ec776f8d57c6579fe89afc9cbe8c1 (patch)
tree099596fb073f8643c7ce296bbc126f6f8190534a /src/wallet/wallet.h
parentd96bdd78307bc5469cb8a4d5ca0e6cbc21fe4073 (diff)
downloadbitcoin-4279da47855ec776f8d57c6579fe89afc9cbe8c1.tar.xz
[wallet] GetBalance can take an isminefilter filter.
GetBalance() can now take an ismine filter, which is passed down to GetAvailableCredit. This allows GetBalance to be used to get watch-only balances.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index b829394847..004c0935eb 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -460,7 +460,7 @@ public:
CAmount GetDebit(const isminefilter& filter) const;
CAmount GetCredit(const isminefilter& filter) const;
CAmount GetImmatureCredit(bool fUseCache=true) const;
- CAmount GetAvailableCredit(bool fUseCache=true) const;
+ CAmount GetAvailableCredit(bool fUseCache=true, const isminefilter& filter=ISMINE_SPENDABLE) const;
CAmount GetImmatureWatchOnlyCredit(const bool fUseCache=true) const;
CAmount GetAvailableWatchOnlyCredit(const bool fUseCache=true) const;
CAmount GetChange() const;
@@ -944,7 +944,7 @@ public:
void ResendWalletTransactions(int64_t nBestBlockTime, CConnman* connman) override;
// ResendWalletTransactionsBefore may only be called if fBroadcastTransactions!
std::vector<uint256> ResendWalletTransactionsBefore(int64_t nTime, CConnman* connman);
- CAmount GetBalance() const;
+ CAmount GetBalance(const isminefilter& filter=ISMINE_SPENDABLE) const;
CAmount GetUnconfirmedBalance() const;
CAmount GetImmatureBalance() const;
CAmount GetWatchOnlyBalance() const;