Alias for ::cs_main. Should be used in new code to make it easier to make ::cs_main a member of this class. Generally, methods of this class should be annotated to require this mutex. This will make calling code more verbose, but also help to: ‐ Clarify that the method will acquire a mutex that heavily affects overall performance. ‐ Force call sites to think how long they need to acquire the mutex to get consistent results.

Synopsis

Declared in <validation.h>

[[lock_returned(::cs_main)]]
RecursiveMutex&
GetMutex() const;

Return Value

A reference to the mutex protecting the chainstate manager (::cs_main).

Created with MrDocs