wallet, refactor: Remove duplicate map lookups in GetAddressBalances

This commit is contained in:
João Barbosa 2020-08-28 12:59:08 +01:00
parent 4326515f01
commit b35e74ba37

View file

@ -3372,9 +3372,6 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances() const
continue;
CAmount n = IsSpent(walletEntry.first, i) ? 0 : wtx.tx->vout[i].nValue;
if (!balances.count(addr))
balances[addr] = 0;
balances[addr] += n;
}
}