Add proper thread safety annotation to CachedTxGetAvailableCredit()

This commit is contained in:
Hennadii Stepanov
2022-05-16 18:24:36 +02:00
parent 187504b038
commit ca446f2c59
2 changed files with 4 additions and 5 deletions

View File

@@ -182,6 +182,8 @@ CAmount CachedTxGetImmatureWatchOnlyCredit(const CWallet& wallet, const CWalletT
CAmount CachedTxGetAvailableCredit(const CWallet& wallet, const CWalletTx& wtx, bool fUseCache, const isminefilter& filter)
{
AssertLockHeld(wallet.cs_wallet);
// Avoid caching ismine for NO or ALL cases (could remove this check and simplify in the future).
bool allow_cache = (filter & ISMINE_ALL) && (filter & ISMINE_ALL) != ISMINE_ALL;