Merge #10500: Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings

b9b814a38 Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings (Russell Yanofsky)

Tree-SHA512: 96a0612ca460ba1bfb3921f3aa348400fd3afa12c40f2ca1f3f04068b1574fe824d577e0123013d8898a4990084316dc1dfb541331849f0996ceff7f4eb25e6b
This commit is contained in:
Pieter Wuille 2017-06-02 16:03:21 -07:00
commit 098b01dc58
No known key found for this signature in database
GPG key ID: A636E97631F767E0

View file

@ -3261,9 +3261,9 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
{
LOCK(cs_wallet);
BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet)
for (const auto& walletEntry : mapWallet)
{
CWalletTx *pcoin = &walletEntry.second;
const CWalletTx *pcoin = &walletEntry.second;
if (!pcoin->IsTrusted())
continue;
@ -3301,9 +3301,9 @@ std::set< std::set<CTxDestination> > CWallet::GetAddressGroupings()
std::set< std::set<CTxDestination> > groupings;
std::set<CTxDestination> grouping;
BOOST_FOREACH(PAIRTYPE(uint256, CWalletTx) walletEntry, mapWallet)
for (const auto& walletEntry : mapWallet)
{
CWalletTx *pcoin = &walletEntry.second;
const CWalletTx *pcoin = &walletEntry.second;
if (pcoin->tx->vin.size() > 0)
{