wallet: remove always false 'recalculate' arg from GetCachableAmount

This commit is contained in:
furszy
2022-07-04 19:40:32 -03:00
parent 47b1012677
commit 4f0ca9bff6

View File

@@ -111,10 +111,10 @@ CAmount TxGetChange(const CWallet& wallet, const CTransaction& tx)
return nChange; 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]; 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)); amount.Set(filter, type == CWalletTx::DEBIT ? wallet.GetDebit(*wtx.tx, filter) : TxGetCredit(wallet, *wtx.tx, filter));
wtx.m_is_cache_empty = false; wtx.m_is_cache_empty = false;
} }