aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/receive.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-05-16 18:24:36 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-05-16 20:51:39 +0200
commitca446f2c59720c1575aeeab9c9d636d98ce8528c (patch)
tree43ed4261d3c361fb06615bcc377b3e883c36a0ce /src/wallet/receive.h
parent187504b038cc1151e5813ac56b79c603439d352c (diff)
downloadbitcoin-ca446f2c59720c1575aeeab9c9d636d98ce8528c.tar.xz
Add proper thread safety annotation to `CachedTxGetAvailableCredit()`
Diffstat (limited to 'src/wallet/receive.h')
-rw-r--r--src/wallet/receive.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/wallet/receive.h b/src/wallet/receive.h
index d7705b5262..06724ee473 100644
--- a/src/wallet/receive.h
+++ b/src/wallet/receive.h
@@ -30,11 +30,8 @@ CAmount CachedTxGetDebit(const CWallet& wallet, const CWalletTx& wtx, const ismi
CAmount CachedTxGetChange(const CWallet& wallet, const CWalletTx& wtx);
CAmount CachedTxGetImmatureCredit(const CWallet& wallet, const CWalletTx& wtx, bool fUseCache = true);
CAmount CachedTxGetImmatureWatchOnlyCredit(const CWallet& wallet, const CWalletTx& wtx, const bool fUseCache = true);
-// TODO: Remove "NO_THREAD_SAFETY_ANALYSIS" and replace it with the correct
-// annotation "EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)". The
-// annotation "NO_THREAD_SAFETY_ANALYSIS" was temporarily added to avoid
-// having to resolve the issue of member access into incomplete type CWallet.
-CAmount CachedTxGetAvailableCredit(const CWallet& wallet, const CWalletTx& wtx, bool fUseCache = true, const isminefilter& filter = ISMINE_SPENDABLE) NO_THREAD_SAFETY_ANALYSIS;
+CAmount CachedTxGetAvailableCredit(const CWallet& wallet, const CWalletTx& wtx, bool fUseCache = true, const isminefilter& filter = ISMINE_SPENDABLE)
+ EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);
struct COutputEntry
{
CTxDestination destination;