mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-09 19:13:28 +02:00
wallet, refactor: Remove duplicate map lookups in GetAddressBalances
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user