@@ -186,7 +186,7 @@ CAmount CachedTxGetImmatureWatchOnlyCredit(const CWallet& wallet, const CWalletT
186186 return 0 ;
187187}
188188
189- CAmount CachedTxGetAvailableCredit (const CWallet& wallet, const CWalletTx& wtx, bool fUseCache , const isminefilter& filter)
189+ CAmount CachedTxGetAvailableCredit (const CWallet& wallet, const CWalletTx& wtx, const isminefilter& filter)
190190{
191191 AssertLockHeld (wallet.cs_wallet );
192192
@@ -197,7 +197,7 @@ CAmount CachedTxGetAvailableCredit(const CWallet& wallet, const CWalletTx& wtx,
197197 if (wallet.IsTxImmatureCoinBase (wtx))
198198 return 0 ;
199199
200- if (fUseCache && allow_cache && wtx.m_amounts [CWalletTx::AVAILABLE_CREDIT].m_cached [filter]) {
200+ if (allow_cache && wtx.m_amounts [CWalletTx::AVAILABLE_CREDIT].m_cached [filter]) {
201201 return wtx.m_amounts [CWalletTx::AVAILABLE_CREDIT].m_value [filter];
202202 }
203203
@@ -332,8 +332,8 @@ Balance GetBalance(const CWallet& wallet, const int min_depth, bool avoid_reuse)
332332 const CWalletTx& wtx = entry.second ;
333333 const bool is_trusted{CachedTxIsTrusted (wallet, wtx, trusted_parents)};
334334 const int tx_depth{wallet.GetTxDepthInMainChain (wtx)};
335- const CAmount tx_credit_mine{CachedTxGetAvailableCredit (wallet, wtx, /* fUseCache= */ true , ISMINE_SPENDABLE | reuse_filter)};
336- const CAmount tx_credit_watchonly{CachedTxGetAvailableCredit (wallet, wtx, /* fUseCache= */ true , ISMINE_WATCH_ONLY | reuse_filter)};
335+ const CAmount tx_credit_mine{CachedTxGetAvailableCredit (wallet, wtx, ISMINE_SPENDABLE | reuse_filter)};
336+ const CAmount tx_credit_watchonly{CachedTxGetAvailableCredit (wallet, wtx, ISMINE_WATCH_ONLY | reuse_filter)};
337337 if (is_trusted && tx_depth >= min_depth) {
338338 ret.m_mine_trusted += tx_credit_mine;
339339 ret.m_watchonly_trusted += tx_credit_watchonly;
0 commit comments