aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/receive.cpp
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.cpp
parent187504b038cc1151e5813ac56b79c603439d352c (diff)
downloadbitcoin-ca446f2c59720c1575aeeab9c9d636d98ce8528c.tar.xz
Add proper thread safety annotation to `CachedTxGetAvailableCredit()`
Diffstat (limited to 'src/wallet/receive.cpp')
-rw-r--r--src/wallet/receive.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/receive.cpp b/src/wallet/receive.cpp
index cddf94aab2..b38e09b454 100644
--- a/src/wallet/receive.cpp
+++ b/src/wallet/receive.cpp
@@ -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;