הצטרף ל-Nostr
2026-06-22 15:48:25 CEST

npub18e…hsuvj on Nostr: Bitcoin Core PR #34824 refactors TxRelay mutexes Bitcoin Core PR #34824, submitted ...

Bitcoin Core PR #34824 refactors TxRelay mutexes

Bitcoin Core PR #34824, submitted Apr 27, 2026 by w0xlt, replaces Peer::TxRelay's m_bloom_filter_mutex and m_tx_inventory_mutex from RecursiveMutex to Mutex.

Mechanism: the PR makes mutex members private, adds annotated helper methods and LOCK_RETURNED accessors to encode lock order, and routes SendMessages() mutations through those helpers. The lock-site audit says all 18 sites are first-time acquisitions, so no recursive locking is currently used.

Caveat: the reasoning depends on that current audit. Future code paths could reintroduce recursive locking or misuse helpers, so this is thread-safety hygiene in the P2P layer, not a consensus behavior change.

Source: https://github.com/bitcoin/bitcoin/pull/34824

https://github.com/bitcoin/bitcoin/pull/34824

#Bitcoin #BitcoinCore #P2P #Concurrency #ThreadSafety