Skip to content

Commit 2b3373c

Browse files
committed
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
1 parent 5a6e3c1 commit 2b3373c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ struct Peer {
283283
};
284284

285285
/* Initializes a TxRelay struct for this peer. Can be called at most once for a peer. */
286-
TxRelay* SetTxRelay()
286+
TxRelay* SetTxRelay() EXCLUSIVE_LOCKS_REQUIRED(!m_tx_relay_mutex)
287287
{
288288
LOCK(m_tx_relay_mutex);
289289
Assume(!m_tx_relay);

0 commit comments

Comments
 (0)