mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
Merge bitcoin/bitcoin#34813: threads: qa: Add lock order annotation for TxMempool::cs
9085dee476qa: Add lock order annotation for TxMempool::cs (David Gumberg) Pull request description: I added this to see if static analysis would catch any lock order inversions while investigating #34731, it did not catch any but it is a worthwhile defense against statically-analyzable inversions of `cs_main->TxMempool::cs`. ACKs for top commit: sedited: tested ACK9085dee476hebasto: ACK9085dee476. w0xlt: ACK9085dee476Tree-SHA512: 498605362e7b197b7643a3f9ffd04589bc9b245aca1d245d289efa145906248c1a72f9fbf4835a9378aabe170b747dc0cc033105915a2bf7a9989de368710c02
This commit is contained in:
@@ -257,7 +257,7 @@ public:
|
||||
* changing the chain tip. It's necessary to keep both mutexes locked until
|
||||
* the mempool is consistent with the new chain tip and fully populated.
|
||||
*/
|
||||
mutable RecursiveMutex cs;
|
||||
mutable RecursiveMutex cs ACQUIRED_AFTER(::cs_main);
|
||||
std::unique_ptr<TxGraph> m_txgraph GUARDED_BY(cs);
|
||||
mutable std::unique_ptr<TxGraph::BlockBuilder> m_builder GUARDED_BY(cs);
|
||||
indexed_transaction_set mapTx GUARDED_BY(cs);
|
||||
|
||||
Reference in New Issue
Block a user