wallet, refactor: Remove duplicate map lookups in GetAddressBalances
This commit is contained in:
1 parent
4326515f01
commit
b35e74ba37
1 file changed
-3
@@ -3372,9 +3372,6 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances() const
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
CAmount n = IsSpent(walletEntry.first, i) ? 0 : wtx.tx->vout[i].nValue;
|
CAmount n = IsSpent(walletEntry.first, i) ? 0 : wtx.tx->vout[i].nValue;
|
||||||
|
|
||||||
if (!balances.count(addr))
|
|
||||||
balances[addr] = 0;
|
|
||||||
balances[addr] += n;
|
balances[addr] += n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user