Skip to content

Commit 0f3d6e9

Browse files
committed
[wallet] factor out GetAvailableWatchOnlyBalance()
1 parent 7110c83 commit 0f3d6e9

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,11 +2026,6 @@ CAmount CWalletTx::GetImmatureWatchOnlyCredit(const bool fUseCache) const
20262026
return 0;
20272027
}
20282028

2029-
CAmount CWalletTx::GetAvailableWatchOnlyCredit(const bool fUseCache) const
2030-
{
2031-
return GetAvailableCredit(fUseCache, ISMINE_WATCH_ONLY);
2032-
}
2033-
20342029
CAmount CWalletTx::GetChange() const
20352030
{
20362031
if (fChangeCached)
@@ -2199,7 +2194,7 @@ CAmount CWallet::GetUnconfirmedWatchOnlyBalance() const
21992194
{
22002195
const CWalletTx* pcoin = &entry.second;
22012196
if (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0 && pcoin->InMempool())
2202-
nTotal += pcoin->GetAvailableWatchOnlyCredit();
2197+
nTotal += pcoin->GetAvailableCredit(true, ISMINE_WATCH_ONLY);
22032198
}
22042199
}
22052200
return nTotal;

src/wallet/wallet.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ class CWalletTx : public CMerkleTx
462462
CAmount GetImmatureCredit(bool fUseCache=true) const;
463463
CAmount GetAvailableCredit(bool fUseCache=true, const isminefilter& filter=ISMINE_SPENDABLE) const;
464464
CAmount GetImmatureWatchOnlyCredit(const bool fUseCache=true) const;
465-
CAmount GetAvailableWatchOnlyCredit(const bool fUseCache=true) const;
466465
CAmount GetChange() const;
467466

468467
// Get the marginal bytes if spending the specified output from this transaction

0 commit comments

Comments
 (0)