From b35e74ba379bdc12ea6d49a45469f0d6aa74cc27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Barbosa?= Date: Fri, 28 Aug 2020 12:59:08 +0100 Subject: [PATCH] wallet, refactor: Remove duplicate map lookups in GetAddressBalances --- src/wallet/wallet.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fa00d12551..0627522eea 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3372,9 +3372,6 @@ std::map CWallet::GetAddressBalances() const continue; CAmount n = IsSpent(walletEntry.first, i) ? 0 : wtx.tx->vout[i].nValue; - - if (!balances.count(addr)) - balances[addr] = 0; balances[addr] += n; } }