@@ -186,7 +186,7 @@ CAmount CachedTxGetImmatureWatchOnlyCredit(const CWallet& wallet, const CWalletT
186
186
return 0 ;
187
187
}
188
188
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)
190
190
{
191
191
AssertLockHeld (wallet.cs_wallet );
192
192
@@ -197,7 +197,7 @@ CAmount CachedTxGetAvailableCredit(const CWallet& wallet, const CWalletTx& wtx,
197
197
if (wallet.IsTxImmatureCoinBase (wtx))
198
198
return 0 ;
199
199
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]) {
201
201
return wtx.m_amounts [CWalletTx::AVAILABLE_CREDIT].m_value [filter];
202
202
}
203
203
@@ -332,8 +332,8 @@ Balance GetBalance(const CWallet& wallet, const int min_depth, bool avoid_reuse)
332
332
const CWalletTx& wtx = entry.second ;
333
333
const bool is_trusted{CachedTxIsTrusted (wallet, wtx, trusted_parents)};
334
334
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)};
337
337
if (is_trusted && tx_depth >= min_depth) {
338
338
ret.m_mine_trusted += tx_credit_mine;
339
339
ret.m_watchonly_trusted += tx_credit_watchonly;
0 commit comments