[#cs_main]
= cs&lowbar;main
:mrdocs:

Mutex to guard access to validation specific variables, such as reading or changing the chainstate&period;

== Synopsis

Declared in `&lt;kernel&sol;cs&lowbar;main&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
extern
xref:RecursiveMutex.adoc[RecursiveMutex] cs&lowbar;main;
----

== Description

This may also need to be locked when updating the transaction pool, e&period;g&period; on AcceptToMemoryPool&period; See CTxMemPool&colon;&colon;cs comment for details&period;

The transaction pool has a separate lock to allow reading from it and the chainstate at the same time&period;


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