mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
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:
commit
098b01dc58
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user