diff options
author | fanquake <fanquake@gmail.com> | 2020-01-15 13:23:49 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-01-15 13:46:21 +0800 |
commit | af05bd9e1e362c3148e3b434b7fac96a9a5155a1 (patch) | |
tree | 4b76b482bac58d459a506e057535832d80b9a553 /src/banman.h | |
parent | ceb789cf3a9075729efa07f5114ce0369d8606c3 (diff) | |
parent | e09c701e0110350f78366fb837308c086b6503c0 (diff) |
Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex
e09c701e0110350f78366fb837308c086b6503c0 scripted-diff: Bump copyright of files changed in 2020 (MarcoFalke)
6cbe6209646db8914b87bf6edbc18c6031a16f1e scripted-diff: Replace CCriticalSection with RecursiveMutex (MarcoFalke)
Pull request description:
`RecursiveMutex` better clarifies that the mutex is recursive, see also the standard library naming: https://en.cppreference.com/w/cpp/thread/recursive_mutex
For that reason, and to avoid different people asking me the same question repeatedly (e.g. https://github.com/bitcoin/bitcoin/pull/15932#pullrequestreview-339175124 ), remove the outdated alias `CCriticalSection` with a scripted-diff
ACKs for top commit:
Empact:
ACK https://github.com/bitcoin/bitcoin/pull/17891/commits/e09c701e0110350f78366fb837308c086b6503c0 diff and scripts look correct
promag:
ACK e09c701e0110350f78366fb837308c086b6503c0
practicalswift:
ACK e09c701e0110350f78366fb837308c086b6503c0 -- scripted diff looks correct
Tree-SHA512: 4bd7b5de1befdcf91dc8f43c127a1fee49679e06895a43216f160344a395c8e426dc68d529fbd2d5e1c215625a5a392dc415b1bce4127316aae7ecf98030c855
Diffstat (limited to 'src/banman.h')
-rw-r--r-- | src/banman.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/banman.h b/src/banman.h index 3997ca8096..8984874914 100644 --- a/src/banman.h +++ b/src/banman.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2019 The Bitcoin Core developers +// Copyright (c) 2009-2020 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_BANMAN_H @@ -59,7 +59,7 @@ private: //!clean unused entries (if bantime has expired) void SweepBanned(); - CCriticalSection m_cs_banned; + RecursiveMutex m_cs_banned; banmap_t m_banned GUARDED_BY(m_cs_banned); bool m_is_dirty GUARDED_BY(m_cs_banned); CClientUIInterface* m_client_interface = nullptr; |