aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-05-20 13:31:08 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-05-20 13:31:08 +0200
commit2b3373c1520aa0b41277cd89956224e08cbd79dd (patch)
tree565c4164e8598505550e9150ac2a80bcf31972e5 /src
parent5a6e3c1db3e9d8ee2ecb0f0fe2fba073a442ad76 (diff)
downloadbitcoin-2b3373c1520aa0b41277cd89956224e08cbd79dd.tar.xz
refactor: Propagate negative `!m_tx_relay_mutex` capability
Could be verified with $ ./configure CC=clang CXX=clang++ CXXFLAGS='-Wthread-safety -Wthread-safety-negative' $ make clean $ make 2>&1 | grep m_tx_relay_mutex
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index a20bc7167e..7aa1c05241 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -283,7 +283,7 @@ struct Peer {
};
/* Initializes a TxRelay struct for this peer. Can be called at most once for a peer. */
- TxRelay* SetTxRelay()
+ TxRelay* SetTxRelay() EXCLUSIVE_LOCKS_REQUIRED(!m_tx_relay_mutex)
{
LOCK(m_tx_relay_mutex);
Assume(!m_tx_relay);