mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings
This commit is contained in:
parent
7e96ecf075
commit
b9b814a38e
1 changed files with 4 additions and 4 deletions
|
@ -3261,9 +3261,9 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
|
||||||
|
|
||||||
{
|
{
|
||||||
LOCK(cs_wallet);
|
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())
|
if (!pcoin->IsTrusted())
|
||||||
continue;
|
continue;
|
||||||
|
@ -3301,9 +3301,9 @@ std::set< std::set<CTxDestination> > CWallet::GetAddressGroupings()
|
||||||
std::set< std::set<CTxDestination> > groupings;
|
std::set< std::set<CTxDestination> > groupings;
|
||||||
std::set<CTxDestination> grouping;
|
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)
|
if (pcoin->tx->vin.size() > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue