mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
doc: Add comment to cs_main and mempool::cs
This commit is contained in:
@@ -210,9 +210,17 @@ private:
|
||||
bool RollforwardBlock(const CBlockIndex* pindex, CCoinsViewCache& inputs, const CChainParams& params) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
} g_chainstate;
|
||||
|
||||
|
||||
|
||||
CCriticalSection cs_main;
|
||||
/**
|
||||
* Mutex to guard access to validation specific variables, such as reading
|
||||
* or changing the chainstate.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
RecursiveMutex cs_main;
|
||||
|
||||
BlockMap& mapBlockIndex = g_chainstate.mapBlockIndex;
|
||||
CChain& chainActive = g_chainstate.chainActive;
|
||||
|
||||
Reference in New Issue
Block a user