Skip to content

Commit 1dfd31b

Browse files
committed
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-
1 parent 887796a commit 1dfd31b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/validation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,8 +2830,8 @@ bool CChainState::ActivateBestChain(BlockValidationState& state, std::shared_ptr
28302830
// ABC maintains a fair degree of expensive-to-calculate internal state
28312831
// because this function periodically releases cs_main so that it does not lock up other threads for too long
28322832
// during large connects - and to allow for e.g. the callback queue to drain
2833-
// we use m_cs_chainstate to enforce mutual exclusion so that only one caller may execute this function at a time
2834-
LOCK(m_cs_chainstate);
2833+
// we use m_chainstate_mutex to enforce mutual exclusion so that only one caller may execute this function at a time
2834+
LOCK(m_chainstate_mutex);
28352835

28362836
CBlockIndex *pindexMostWork = nullptr;
28372837
CBlockIndex *pindexNewTip = nullptr;
@@ -2961,7 +2961,7 @@ bool CChainState::InvalidateBlock(BlockValidationState& state, CBlockIndex* pind
29612961
// We do not allow ActivateBestChain() to run while InvalidateBlock() is
29622962
// running, as that could cause the tip to change while we disconnect
29632963
// blocks.
2964-
LOCK(m_cs_chainstate);
2964+
LOCK(m_chainstate_mutex);
29652965

29662966
// We'll be acquiring and releasing cs_main below, to allow the validation
29672967
// callbacks to run. However, we should keep the block index in a

src/validation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ class CChainState
536536
* the ChainState CriticalSection
537537
* A lock that must be held when modifying this ChainState - held in ActivateBestChain()
538538
*/
539-
RecursiveMutex m_cs_chainstate;
539+
RecursiveMutex m_chainstate_mutex;
540540

541541
/**
542542
* Whether this chainstate is undergoing initial block download.

0 commit comments

Comments
 (0)