[#ChainstateManager-GetMutex]
= xref:ChainstateManager.adoc[ChainstateManager]::GetMutex
:relfileprefix: ../
:mrdocs:

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

== Synopsis

Declared in `&lt;validation&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;lock&lowbar;returned(&colon;&colon;cs&lowbar;main)&rsqb;&rsqb;
xref:RecursiveMutex.adoc[RecursiveMutex]&
GetMutex() const;
----

== Return Value

A reference to the mutex protecting the chainstate manager (&colon;&colon;cs&lowbar;main)&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
