From 4f0ca9bff6299353f595fe168dce720a96a91c41 Mon Sep 17 00:00:00 2001 From: furszy Date: Mon, 4 Jul 2022 19:40:32 -0300 Subject: [PATCH] wallet: remove always false 'recalculate' arg from GetCachableAmount --- src/wallet/receive.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/receive.cpp b/src/wallet/receive.cpp index e9d59d8f0fe..5bee00baa69 100644 --- a/src/wallet/receive.cpp +++ b/src/wallet/receive.cpp @@ -111,10 +111,10 @@ CAmount TxGetChange(const CWallet& wallet, const CTransaction& tx) return nChange; } -static CAmount GetCachableAmount(const CWallet& wallet, const CWalletTx& wtx, CWalletTx::AmountType type, const isminefilter& filter, bool recalculate = false) +static CAmount GetCachableAmount(const CWallet& wallet, const CWalletTx& wtx, CWalletTx::AmountType type, const isminefilter& filter) { auto& amount = wtx.m_amounts[type]; - if (recalculate || !amount.m_cached[filter]) { + if (!amount.m_cached[filter]) { amount.Set(filter, type == CWalletTx::DEBIT ? wallet.GetDebit(*wtx.tx, filter) : TxGetCredit(wallet, *wtx.tx, filter)); wtx.m_is_cache_empty = false; }