mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
refactor: replace RecursiveMutex m_most_recent_block_mutex
with Mutex
In each of the critical sections, only the the guarded variables are accessed, without any chance that within one section another one is called. Hence, we can use an ordinary Mutex instead of RecursiveMutex.
This commit is contained in:
parent
8edd0d31ac
commit
83003ffe04
1 changed files with 1 additions and 1 deletions
|
@ -687,7 +687,7 @@ private:
|
|||
|
||||
|
||||
// All of the following cache a recent block, and are protected by m_most_recent_block_mutex
|
||||
RecursiveMutex m_most_recent_block_mutex;
|
||||
Mutex m_most_recent_block_mutex;
|
||||
std::shared_ptr<const CBlock> m_most_recent_block GUARDED_BY(m_most_recent_block_mutex);
|
||||
std::shared_ptr<const CBlockHeaderAndShortTxIDs> m_most_recent_compact_block GUARDED_BY(m_most_recent_block_mutex);
|
||||
uint256 m_most_recent_block_hash GUARDED_BY(m_most_recent_block_mutex);
|
||||
|
|
Loading…
Reference in a new issue