mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 11:33:46 +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;
|
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