mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-25 23:16:16 +01:00
fd290730f5validation: clean up and clarify CheckInputScripts logic (Cory Fields)1a37507895validation: use a lock for CCheckQueueControl (Cory Fields)c3b0e6c7f4validation: make CCheckQueueControl's CCheckQueue non-optional (Cory Fields)4c8c90b556validation: only create a CCheckQueueControl if it's actually going to be used (Cory Fields)11fed833b3threading: 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](https://github.com/bitcoin/bitcoin/pull/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-ACKfd290730f5ryanofsky: Code review ACKfd290730f5, just removing assert since last review. Thanks for considering all the comments and feedback! TheCharlatan: Re-ACKfd290730f5Tree-SHA512: 54b9db604ee1bda7d11bce1653a88d3dcbc4f525eed6a85abdd4d6409138674af4bb8b00afa4e0d3d29dadd045a3a39de253a45f0ef9c05f56cba1aac5b59303