refactor: add kernel/cs_main.*

Co-authored-by: Anthony Towns <aj@erisian.com.au>
This commit is contained in:
fanquake
2022-09-15 10:45:07 +01:00
parent 296e882250
commit 282019cd3d
17 changed files with 44 additions and 27 deletions

View File

@@ -107,18 +107,6 @@ const std::vector<std::string> CHECKLEVEL_DOC {
* */
static constexpr int PRUNE_LOCK_BUFFER{10};
/**
* 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;
GlobalMutex g_best_block_mutex;
std::condition_variable g_best_block_cv;
uint256 g_best_block;