[#cs_main] = cs_main :mrdocs: Mutex to guard access to validation specific variables, such as reading or changing the chainstate. == Synopsis Declared in `<kernel/cs_main.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- extern xref:RecursiveMutex.adoc[RecursiveMutex] cs_main; ---- == Description This may also need to be locked when updating the transaction pool, e.g. on AcceptToMemoryPool. See CTxMemPool::cs comment for details. The transaction pool has a separate lock to allow reading from it and the chainstate at the same time. [.small]#Created with https://www.mrdocs.com[MrDocs]#