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 committed by Pasta
parent e353d271f0
commit f59e5e67f0

View File

@ -4270,9 +4270,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;
@ -4310,9 +4310,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)
{