This diff adds a cs_main runtime check to the proof isWorthPolling variant. The addToReconcile (and in turn the isWorthPolling visitor that it calls) is critical to get thread safe and avoid lock ordering issues as it is called from various threads (sceduler, net, ...).
Unfortunately clang thread safety annotation does not play well with std::variants as it assumes all the variants are reachable, making it complicated and inefficient to maintain the annotations.
As a consequence this diff also removes some annotations from addToReconcile and co. which are arleady present at the variant level and caught by the debug builds or tsan.
Details
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABCbf17fb0be522: [avalanche] Sanitize the thread safety checks in the processor
With Clang and Debug:
ninja all check
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable