From da8f62de2c5561e091ef8073d6950c033f41aabf Mon Sep 17 00:00:00 2001 From: furszy Date: Mon, 4 Jul 2022 19:39:20 -0300 Subject: [PATCH] wallet: remove always true 'fUseCache' from CachedTxGetImmatureCredit --- src/wallet/receive.cpp | 4 ++-- src/wallet/receive.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/receive.cpp b/src/wallet/receive.cpp index 8de4017371a..8512ee9b2c4 100644 --- a/src/wallet/receive.cpp +++ b/src/wallet/receive.cpp @@ -164,12 +164,12 @@ CAmount CachedTxGetChange(const CWallet& wallet, const CWalletTx& wtx) return wtx.nChangeCached; } -CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx, bool fUseCache) +CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx) { AssertLockHeld(wallet.cs_wallet); if (wallet.IsTxImmatureCoinBase(wtx) && wallet.IsTxInMainChain(wtx)) { - return GetCachableAmount(wallet, wtx, CWalletTx::IMMATURE_CREDIT, ISMINE_SPENDABLE, !fUseCache); + return GetCachableAmount(wallet, wtx, CWalletTx::IMMATURE_CREDIT, ISMINE_SPENDABLE); } return 0; diff --git a/src/wallet/receive.h b/src/wallet/receive.h index 1caef293f27..0283bdcfca0 100644 --- a/src/wallet/receive.h +++ b/src/wallet/receive.h @@ -29,7 +29,7 @@ CAmount CachedTxGetCredit(const CWallet& wallet, const CWalletTx& wtx, const ism //! filter decides which addresses will count towards the debit CAmount CachedTxGetDebit(const CWallet& wallet, const CWalletTx& wtx, const isminefilter& filter); CAmount CachedTxGetChange(const CWallet& wallet, const CWalletTx& wtx); -CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx, bool fUseCache = true) +CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet); CAmount CachedTxGetImmatureWatchOnlyCredit(const CWallet& wallet, const CWalletTx& wtx, const bool fUseCache = true) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);