[#ChainstateManager-GetMutex] = xref:ChainstateManager.adoc[ChainstateManager]::GetMutex :relfileprefix: ../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[lock_returned(::cs_main)]] xref:RecursiveMutex.adoc[RecursiveMutex]& GetMutex() const; ---- == Return Value A reference to the mutex protecting the chainstate manager (::cs_main). [.small]#Created with https://www.mrdocs.com[MrDocs]#