Browse Source

Merge #10500: Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings

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

Tree-SHA512: 96a0612ca460ba1bfb3921f3aa348400fd3afa12c40f2ca1f3f04068b1574fe824d577e0123013d8898a4990084316dc1dfb541331849f0996ceff7f4eb25e6b
0.15
Pieter Wuille 8 years ago
parent
commit
098b01dc58
No known key found for this signature in database
GPG Key ID: A636E97631F767E0
  1. 8
      src/wallet/wallet.cpp

8
src/wallet/wallet.cpp

@ -3261,9 +3261,9 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances() @@ -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() @@ -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)
{

Loading…
Cancel
Save