Skip to content

Commit da8f62d

Browse files
committed
wallet: remove always true 'fUseCache' from CachedTxGetImmatureCredit
1 parent 9fb2a2b commit da8f62d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/wallet/receive.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ CAmount CachedTxGetChange(const CWallet& wallet, const CWalletTx& wtx)
164164
return wtx.nChangeCached;
165165
}
166166

167-
CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx, bool fUseCache)
167+
CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx)
168168
{
169169
AssertLockHeld(wallet.cs_wallet);
170170

171171
if (wallet.IsTxImmatureCoinBase(wtx) && wallet.IsTxInMainChain(wtx)) {
172-
return GetCachableAmount(wallet, wtx, CWalletTx::IMMATURE_CREDIT, ISMINE_SPENDABLE, !fUseCache);
172+
return GetCachableAmount(wallet, wtx, CWalletTx::IMMATURE_CREDIT, ISMINE_SPENDABLE);
173173
}
174174

175175
return 0;

src/wallet/receive.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CAmount CachedTxGetCredit(const CWallet& wallet, const CWalletTx& wtx, const ism
2929
//! filter decides which addresses will count towards the debit
3030
CAmount CachedTxGetDebit(const CWallet& wallet, const CWalletTx& wtx, const isminefilter& filter);
3131
CAmount CachedTxGetChange(const CWallet& wallet, const CWalletTx& wtx);
32-
CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx, bool fUseCache = true)
32+
CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx)
3333
EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);
3434
CAmount CachedTxGetImmatureWatchOnlyCredit(const CWallet& wallet, const CWalletTx& wtx, const bool fUseCache = true)
3535
EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);

0 commit comments

Comments
 (0)