You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin/bitcoin#32467: checkqueue: make the queue non-optional for CCheckQueueControl and drop legacy locking macro usage
fd29073 validation: clean up and clarify CheckInputScripts logic (Cory Fields)
1a37507 validation: use a lock for CCheckQueueControl (Cory Fields)
c3b0e6c validation: make CCheckQueueControl's CCheckQueue non-optional (Cory Fields)
4c8c90b validation: only create a CCheckQueueControl if it's actually going to be used (Cory Fields)
11fed83 threading: add LOCK_ARGS macro (Cory Fields)
Pull request description:
As part of an effort to cleanup our threading primitives and add safe `SharedMutex`/`SharedLock` impls, I'd like to get rid of the last of our legacy `ENTER_CRITICAL_SECTION`/`LEAVE_CRITICAL_SECTION` usage. This, along with a follow-up [after fixing REVERSE_LOCK](bitcoin/bitcoin#32465) will allow us to do that.
This replaces the old macros with an RAII lock, while simplifying `CCheckQueueControl`. It now requires a `CCheckQueue`, and optionality is handled externally. In the case of validation, it is wrapped in a `std::optional`.
It also adds an `LOCK_ARGS` macro for `UniqueLock` initialization which may be helpful elsewhere.
ACKs for top commit:
fjahr:
re-ACK fd29073
ryanofsky:
Code review ACK fd29073, just removing assert since last review. Thanks for considering all the comments and feedback!
TheCharlatan:
Re-ACK fd29073
Tree-SHA512: 54b9db604ee1bda7d11bce1653a88d3dcbc4f525eed6a85abdd4d6409138674af4bb8b00afa4e0d3d29dadd045a3a39de253a45f0ef9c05f56cba1aac5b59303
0 commit comments