Fix -Wthread-safety-analysis warnings. Compile with -Wthread-safety-analysis if available.
- Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror)
- Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost.
This code was written by @TheBlueMatt in the following branch:
This commit message was written by me (@practicalswift) who also squashed
@TheBlueMatt's commits into one and tried to summarize the changes made.
Remove boost include. Remove boost mentions in comments.
- Add mutex requirement for AddToCompactExtraTransactions(…)
The vector vExtraTxnForCompact, which is guarded by the mutex
cs_main, is accessed in AddToCompactExtraTransactions(…).
This is a backport of Core PR10866
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D1902