scripted-diff: rename m_cs_chainstate -> m_chainstate_mutex

-BEGIN VERIFY SCRIPT-
s() { sed -i 's/m_cs_chainstate/m_chainstate_mutex/g' $1; }
s src/validation.cpp
s src/validation.h
-END VERIFY SCRIPT-
This commit is contained in:
w0xlt committed 2022-01-19 14:43:15 -03:00
1 parent 887796a5ff
commit 1dfd31bc26
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -2830,8 +2830,8 @@ bool CChainState::ActivateBestChain(BlockValidationState& state, std::shared_ptr
// ABC maintains a fair degree of expensive-to-calculate internal state // ABC maintains a fair degree of expensive-to-calculate internal state
// because this function periodically releases cs_main so that it does not lock up other threads for too long // because this function periodically releases cs_main so that it does not lock up other threads for too long
// during large connects - and to allow for e.g. the callback queue to drain // during large connects - and to allow for e.g. the callback queue to drain
// we use m_cs_chainstate to enforce mutual exclusion so that only one caller may execute this function at a time // we use m_chainstate_mutex to enforce mutual exclusion so that only one caller may execute this function at a time
LOCK(m_cs_chainstate); LOCK(m_chainstate_mutex);
CBlockIndex *pindexMostWork = nullptr; CBlockIndex *pindexMostWork = nullptr;
CBlockIndex *pindexNewTip = nullptr; CBlockIndex *pindexNewTip = nullptr;
@@ -2961,7 +2961,7 @@ bool CChainState::InvalidateBlock(BlockValidationState& state, CBlockIndex* pind
// We do not allow ActivateBestChain() to run while InvalidateBlock() is // We do not allow ActivateBestChain() to run while InvalidateBlock() is
// running, as that could cause the tip to change while we disconnect // running, as that could cause the tip to change while we disconnect
// blocks. // blocks.
LOCK(m_cs_chainstate); LOCK(m_chainstate_mutex);
// We'll be acquiring and releasing cs_main below, to allow the validation // We'll be acquiring and releasing cs_main below, to allow the validation
// callbacks to run. However, we should keep the block index in a // callbacks to run. However, we should keep the block index in a
+1 -1
View File
@@ -536,7 +536,7 @@ protected:
* the ChainState CriticalSection * the ChainState CriticalSection
* A lock that must be held when modifying this ChainState - held in ActivateBestChain() * A lock that must be held when modifying this ChainState - held in ActivateBestChain()
*/ */
RecursiveMutex m_cs_chainstate; RecursiveMutex m_chainstate_mutex;
/** /**
* Whether this chainstate is undergoing initial block download. * Whether this chainstate is undergoing initial block download.