aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2018-06-27 11:53:08 -0400
committerJohn Newbery <john@johnnewbery.com>2018-06-28 17:56:59 -0400
commit0f3d6e9ab75837ead3acfda342aa3ea404efb81d (patch)
tree9619fdeaed15d6d7bc54483b6be0565aeec0048b /src
parent7110c830f8c5de3570178bf4e5d28fe3e4f109e1 (diff)
downloadbitcoin-0f3d6e9ab75837ead3acfda342aa3ea404efb81d.tar.xz
[wallet] factor out GetAvailableWatchOnlyBalance()
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp7
-rw-r--r--src/wallet/wallet.h1
2 files changed, 1 insertions, 7 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 4d3263671c..1038416fe4 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2026,11 +2026,6 @@ CAmount CWalletTx::GetImmatureWatchOnlyCredit(const bool fUseCache) const
return 0;
}
-CAmount CWalletTx::GetAvailableWatchOnlyCredit(const bool fUseCache) const
-{
- return GetAvailableCredit(fUseCache, ISMINE_WATCH_ONLY);
-}
-
CAmount CWalletTx::GetChange() const
{
if (fChangeCached)
@@ -2199,7 +2194,7 @@ CAmount CWallet::GetUnconfirmedWatchOnlyBalance() const
{
const CWalletTx* pcoin = &entry.second;
if (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0 && pcoin->InMempool())
- nTotal += pcoin->GetAvailableWatchOnlyCredit();
+ nTotal += pcoin->GetAvailableCredit(true, ISMINE_WATCH_ONLY);
}
}
return nTotal;
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 4cb881bc48..bc70ffc595 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -462,7 +462,6 @@ public:
CAmount GetImmatureCredit(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;
// Get the marginal bytes if spending the specified output from this transaction