mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 11:33:46 +02:00
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
This commit is contained in:
@@ -283,7 +283,7 @@ struct Peer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Initializes a TxRelay struct for this peer. Can be called at most once for a 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);
|
LOCK(m_tx_relay_mutex);
|
||||||
Assume(!m_tx_relay);
|
Assume(!m_tx_relay);
|
||||||
|
Reference in New Issue
Block a user