diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-01-07 23:14:15 +0700 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-01-15 01:43:46 +0700 |
commit | 6cbe6209646db8914b87bf6edbc18c6031a16f1e (patch) | |
tree | 1b30ad3bd585cc3e91cf036943c195b25dfd4a19 /src/validation.h | |
parent | ceb789cf3a9075729efa07f5114ce0369d8606c3 (diff) |
scripted-diff: Replace CCriticalSection with RecursiveMutex
-BEGIN VERIFY SCRIPT-
# Delete outdated alias for RecursiveMutex
sed -i -e '/CCriticalSection/d' ./src/sync.h
# Replace use of outdated alias with RecursiveMutex
sed -i -e 's/CCriticalSection/RecursiveMutex/g' $(git grep -l CCriticalSection)
-END VERIFY SCRIPT-
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/validation.h b/src/validation.h index 81b2ccffc2..7df3801f65 100644 --- a/src/validation.h +++ b/src/validation.h @@ -136,7 +136,7 @@ struct BlockHasher size_t operator()(const uint256& hash) const { return ReadLE64(hash.begin()); } }; -extern CCriticalSection cs_main; +extern RecursiveMutex cs_main; extern CBlockPolicyEstimator feeEstimator; extern CTxMemPool mempool; typedef std::unordered_map<uint256, CBlockIndex*, BlockHasher> BlockMap; @@ -560,7 +560,7 @@ private: * Every received block is assigned a unique and increasing identifier, so we * know which one to give priority in case of a fork. */ - CCriticalSection cs_nBlockSequenceId; + RecursiveMutex cs_nBlockSequenceId; /** Blocks loaded from disk are assigned id 0, so start the counter at 1. */ int32_t nBlockSequenceId = 1; /** Decreasing counter (used by subsequent preciousblock calls). */ @@ -572,7 +572,7 @@ private: * the ChainState CriticalSection * A lock that must be held when modifying this ChainState - held in ActivateBestChain() */ - CCriticalSection m_cs_chainstate; + RecursiveMutex m_cs_chainstate; /** * Whether this chainstate is undergoing initial block download. |