From d3a56be77a9d112cde4baef4314882170b9f228f Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Thu, 2 Apr 2020 07:55:14 -0400 Subject: Revert "gui: Avoid Wallet::GetBalance in WalletModel::pollBalanceChanged" This reverts commit 0933a37078e1ce3a3d70983c3e7f4b3ac6c3fa37 from https://github.com/bitcoin/bitcoin/pull/18160 which no longer an optimization since commit "gui: Avoid wallet tryGetBalances calls before TransactionChanged or BlockTip notifications". --- src/interfaces/wallet.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/interfaces/wallet.cpp') diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index 752448aac..3521ca8e3 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -351,14 +351,13 @@ public: } return result; } - bool tryGetBalances(WalletBalances& balances, int& num_blocks, bool force, int cached_num_blocks) override + bool tryGetBalances(WalletBalances& balances, int& num_blocks) override { TRY_LOCK(m_wallet->cs_wallet, locked_wallet); if (!locked_wallet) { return false; } num_blocks = m_wallet->GetLastBlockHeight(); - if (!force && num_blocks == cached_num_blocks) return false; balances = getBalances(); return true; } -- cgit v1.2.3