[wallet] factor out GetAvailableWatchOnlyBalance()

This commit is contained in:
John Newbery 2018-06-27 11:53:08 -04:00
parent 7110c830f8
commit 0f3d6e9ab7
2 changed files with 1 additions and 7 deletions

View file

@ -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;

View file

@ -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