[wallet] Factor out GetWatchOnlyBalance()

This commit is contained in:
John Newbery
2018-06-27 13:43:25 -04:00
parent 4279da4785
commit ef7bc8893c
3 changed files with 1 additions and 18 deletions
-16
View File
@@ -2211,22 +2211,6 @@ CAmount CWallet::GetImmatureBalance() const
return nTotal;
}
CAmount CWallet::GetWatchOnlyBalance() const
{
CAmount nTotal = 0;
{
LOCK2(cs_main, cs_wallet);
for (const auto& entry : mapWallet)
{
const CWalletTx* pcoin = &entry.second;
if (pcoin->IsTrusted())
nTotal += pcoin->GetAvailableWatchOnlyCredit();
}
}
return nTotal;
}
CAmount CWallet::GetUnconfirmedWatchOnlyBalance() const
{
CAmount nTotal = 0;