refactor: replace RecursiveMutex m_most_recent_block_mutex with Mutex
Summary:
refactor: reduce scope of lock m_most_recent_block_mutex
This avoids calling the non-trivial method
CConnman::PushMessage within the critical section.
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 is a backport of core#24062
Depends on D14878
Test Plan:
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14880