mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 04:42:36 -03:00
Merge #17891: scripted-diff: Replace CCriticalSection with RecursiveMutex
e09c701e01
scripted-diff: Bump copyright of files changed in 2020 (MarcoFalke)6cbe620964
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: ACKe09c701e01
diff and scripts look correct promag: ACKe09c701e01
practicalswift: ACKe09c701e01
-- scripted diff looks correct Tree-SHA512: 4bd7b5de1befdcf91dc8f43c127a1fee49679e06895a43216f160344a395c8e426dc68d529fbd2d5e1c215625a5a392dc415b1bce4127316aae7ecf98030c855
This commit is contained in:
commit
af05bd9e1e
79 changed files with 127 additions and 128 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-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.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2015-2018 The Bitcoin Core developers
|
||||
# Copyright (c) 2015-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.
|
||||
'''
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016-2018 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2014-2018 The Bitcoin Core developers
|
||||
# Copyright (c) 2014-2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2012 Pieter Wuille
|
||||
// Copyright (c) 2012-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2012-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.
|
||||
|
||||
|
@ -172,7 +172,7 @@ class CAddrMan
|
|||
{
|
||||
protected:
|
||||
//! critical section to protect the inner data structures
|
||||
mutable CCriticalSection cs;
|
||||
mutable RecursiveMutex cs;
|
||||
|
||||
private:
|
||||
//! last used nId
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2015-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2015-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2018-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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -172,7 +172,7 @@ void Interrupt(NodeContext& node)
|
|||
void Shutdown(NodeContext& node)
|
||||
{
|
||||
LogPrintf("%s: In progress...\n", __func__);
|
||||
static CCriticalSection cs_Shutdown;
|
||||
static RecursiveMutex cs_Shutdown;
|
||||
TRY_LOCK(cs_Shutdown, lockShutdown);
|
||||
if (!lockShutdown)
|
||||
return;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2018-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.
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
namespace interfaces {
|
||||
namespace {
|
||||
|
||||
class LockImpl : public Chain::Lock, public UniqueLock<CCriticalSection>
|
||||
class LockImpl : public Chain::Lock, public UniqueLock<RecursiveMutex>
|
||||
{
|
||||
Optional<int> getHeight() override
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2018-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2018-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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -85,7 +85,7 @@ static const uint64_t RANDOMIZER_ID_LOCALHOSTNONCE = 0xd93e69e2bbfa5735ULL; // S
|
|||
bool fDiscover = true;
|
||||
bool fListen = true;
|
||||
bool g_relay_txes = !DEFAULT_BLOCKSONLY;
|
||||
CCriticalSection cs_mapLocalHost;
|
||||
RecursiveMutex cs_mapLocalHost;
|
||||
std::map<CNetAddr, LocalServiceInfo> mapLocalHost GUARDED_BY(cs_mapLocalHost);
|
||||
static bool vfLimited[NET_MAX] GUARDED_BY(cs_mapLocalHost) = {};
|
||||
std::string strSubVersion;
|
||||
|
|
36
src/net.h
36
src/net.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.
|
||||
|
||||
|
@ -384,8 +384,8 @@ private:
|
|||
static bool NodeFullyConnected(const CNode* pnode);
|
||||
|
||||
// Network usage totals
|
||||
CCriticalSection cs_totalBytesRecv;
|
||||
CCriticalSection cs_totalBytesSent;
|
||||
RecursiveMutex cs_totalBytesRecv;
|
||||
RecursiveMutex cs_totalBytesSent;
|
||||
uint64_t nTotalBytesRecv GUARDED_BY(cs_totalBytesRecv) {0};
|
||||
uint64_t nTotalBytesSent GUARDED_BY(cs_totalBytesSent) {0};
|
||||
|
||||
|
@ -410,12 +410,12 @@ private:
|
|||
bool fAddressesInitialized{false};
|
||||
CAddrMan addrman;
|
||||
std::deque<std::string> vOneShots GUARDED_BY(cs_vOneShots);
|
||||
CCriticalSection cs_vOneShots;
|
||||
RecursiveMutex cs_vOneShots;
|
||||
std::vector<std::string> vAddedNodes GUARDED_BY(cs_vAddedNodes);
|
||||
CCriticalSection cs_vAddedNodes;
|
||||
RecursiveMutex cs_vAddedNodes;
|
||||
std::vector<CNode*> vNodes GUARDED_BY(cs_vNodes);
|
||||
std::list<CNode*> vNodesDisconnected;
|
||||
mutable CCriticalSection cs_vNodes;
|
||||
mutable RecursiveMutex cs_vNodes;
|
||||
std::atomic<NodeId> nLastNodeId{0};
|
||||
unsigned int nPrevNodeCount{0};
|
||||
|
||||
|
@ -565,7 +565,7 @@ struct LocalServiceInfo {
|
|||
int nPort;
|
||||
};
|
||||
|
||||
extern CCriticalSection cs_mapLocalHost;
|
||||
extern RecursiveMutex cs_mapLocalHost;
|
||||
extern std::map<CNetAddr, LocalServiceInfo> mapLocalHost GUARDED_BY(cs_mapLocalHost);
|
||||
|
||||
extern const std::string NET_MESSAGE_COMMAND_OTHER;
|
||||
|
@ -713,15 +713,15 @@ public:
|
|||
size_t nSendOffset{0}; // offset inside the first vSendMsg already sent
|
||||
uint64_t nSendBytes GUARDED_BY(cs_vSend){0};
|
||||
std::deque<std::vector<unsigned char>> vSendMsg GUARDED_BY(cs_vSend);
|
||||
CCriticalSection cs_vSend;
|
||||
CCriticalSection cs_hSocket;
|
||||
CCriticalSection cs_vRecv;
|
||||
RecursiveMutex cs_vSend;
|
||||
RecursiveMutex cs_hSocket;
|
||||
RecursiveMutex cs_vRecv;
|
||||
|
||||
CCriticalSection cs_vProcessMsg;
|
||||
RecursiveMutex cs_vProcessMsg;
|
||||
std::list<CNetMessage> vProcessMsg GUARDED_BY(cs_vProcessMsg);
|
||||
size_t nProcessQueueSize{0};
|
||||
|
||||
CCriticalSection cs_sendProcessing;
|
||||
RecursiveMutex cs_sendProcessing;
|
||||
|
||||
std::deque<CInv> vRecvGetData;
|
||||
uint64_t nRecvBytes GUARDED_BY(cs_vRecv){0};
|
||||
|
@ -787,11 +787,11 @@ public:
|
|||
// There is no final sorting before sending, as they are always sent immediately
|
||||
// and in the order requested.
|
||||
std::vector<uint256> vInventoryBlockToSend GUARDED_BY(cs_inventory);
|
||||
CCriticalSection cs_inventory;
|
||||
RecursiveMutex cs_inventory;
|
||||
|
||||
struct TxRelay {
|
||||
TxRelay() { pfilter = MakeUnique<CBloomFilter>(); }
|
||||
mutable CCriticalSection cs_filter;
|
||||
mutable RecursiveMutex cs_filter;
|
||||
// We use fRelayTxes for two purposes -
|
||||
// a) it allows us to not relay tx invs before receiving the peer's version message
|
||||
// b) the peer may tell us in its version message that we should not relay tx invs
|
||||
|
@ -799,7 +799,7 @@ public:
|
|||
bool fRelayTxes GUARDED_BY(cs_filter){false};
|
||||
std::unique_ptr<CBloomFilter> pfilter PT_GUARDED_BY(cs_filter) GUARDED_BY(cs_filter);
|
||||
|
||||
mutable CCriticalSection cs_tx_inventory;
|
||||
mutable RecursiveMutex cs_tx_inventory;
|
||||
CRollingBloomFilter filterInventoryKnown GUARDED_BY(cs_tx_inventory){50000, 0.000001};
|
||||
// Set of transaction ids we still have to announce.
|
||||
// They are sorted by the mempool before relay, so the order is not important.
|
||||
|
@ -810,7 +810,7 @@ public:
|
|||
std::atomic<std::chrono::seconds> m_last_mempool_req{std::chrono::seconds{0}};
|
||||
std::chrono::microseconds nNextInvSend{0};
|
||||
|
||||
CCriticalSection cs_feeFilter;
|
||||
RecursiveMutex cs_feeFilter;
|
||||
// Minimum fee rate with which to filter inv's to this node
|
||||
CAmount minFeeFilter GUARDED_BY(cs_feeFilter){0};
|
||||
CAmount lastSentFeeFilter{0};
|
||||
|
@ -872,12 +872,12 @@ private:
|
|||
NetPermissionFlags m_permissionFlags{ PF_NONE };
|
||||
std::list<CNetMessage> vRecvMsg; // Used only by SocketHandler thread
|
||||
|
||||
mutable CCriticalSection cs_addrName;
|
||||
mutable RecursiveMutex cs_addrName;
|
||||
std::string addrName GUARDED_BY(cs_addrName);
|
||||
|
||||
// Our address, as reported by the peer
|
||||
CService addrLocal GUARDED_BY(cs_addrLocal);
|
||||
mutable CCriticalSection cs_addrLocal;
|
||||
mutable RecursiveMutex cs_addrLocal;
|
||||
public:
|
||||
|
||||
NodeId GetId() const {
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -90,7 +90,7 @@ struct COrphanTx {
|
|||
int64_t nTimeExpire;
|
||||
size_t list_pos;
|
||||
};
|
||||
CCriticalSection g_cs_orphans;
|
||||
RecursiveMutex g_cs_orphans;
|
||||
std::map<uint256, COrphanTx> mapOrphanTransactions GUARDED_BY(g_cs_orphans);
|
||||
|
||||
void EraseOrphansFor(NodeId peer);
|
||||
|
@ -1162,7 +1162,7 @@ void PeerLogicValidation::BlockConnected(const std::shared_ptr<const CBlock>& pb
|
|||
}
|
||||
|
||||
// All of the following cache a recent block, and are protected by cs_most_recent_block
|
||||
static CCriticalSection cs_most_recent_block;
|
||||
static RecursiveMutex cs_most_recent_block;
|
||||
static std::shared_ptr<const CBlock> most_recent_block GUARDED_BY(cs_most_recent_block);
|
||||
static std::shared_ptr<const CBlockHeaderAndShortTxIDs> most_recent_compact_block GUARDED_BY(cs_most_recent_block);
|
||||
static uint256 most_recent_block_hash GUARDED_BY(cs_most_recent_block);
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
#include <consensus/params.h>
|
||||
#include <sync.h>
|
||||
|
||||
extern CCriticalSection cs_main;
|
||||
extern RecursiveMutex cs_main;
|
||||
|
||||
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
|
||||
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
#endif
|
||||
|
||||
// Settings
|
||||
static CCriticalSection cs_proxyInfos;
|
||||
static RecursiveMutex cs_proxyInfos;
|
||||
static proxyType proxyInfo[NET_MAX] GUARDED_BY(cs_proxyInfos);
|
||||
static proxyType nameProxy GUARDED_BY(cs_proxyInfos);
|
||||
int nConnectTimeout = DEFAULT_CONNECT_TIMEOUT;
|
||||
|
|
|
@ -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_POLICY_FEES_H
|
||||
|
@ -223,7 +223,7 @@ public:
|
|||
unsigned int HighestTargetTracked(FeeEstimateHorizon horizon) const;
|
||||
|
||||
private:
|
||||
mutable CCriticalSection m_cs_fee_estimator;
|
||||
mutable RecursiveMutex m_cs_fee_estimator;
|
||||
|
||||
unsigned int nBestSeenHeight GUARDED_BY(m_cs_fee_estimator);
|
||||
unsigned int firstRecordedHeight GUARDED_BY(m_cs_fee_estimator);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018-2017 The Bitcoin Core developers
|
||||
// Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 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.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 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.
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
#include <memory> // for unique_ptr
|
||||
#include <unordered_map>
|
||||
|
||||
static CCriticalSection cs_rpcWarmup;
|
||||
static RecursiveMutex cs_rpcWarmup;
|
||||
static std::atomic<bool> g_rpc_running{false};
|
||||
static bool fRPCInWarmup GUARDED_BY(cs_rpcWarmup) = true;
|
||||
static std::string rpcWarmupStatus GUARDED_BY(cs_rpcWarmup) = "RPC server started";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2015-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2015-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.
|
||||
|
||||
|
@ -98,7 +98,7 @@ class SingleThreadedSchedulerClient {
|
|||
private:
|
||||
CScheduler *m_pscheduler;
|
||||
|
||||
CCriticalSection m_cs_callbacks_pending;
|
||||
RecursiveMutex m_cs_callbacks_pending;
|
||||
std::list<std::function<void ()>> m_callbacks_pending GUARDED_BY(m_cs_callbacks_pending);
|
||||
bool m_are_callbacks_running GUARDED_BY(m_cs_callbacks_pending) = false;
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -72,7 +72,7 @@ protected:
|
|||
void ImplicitlyLearnRelatedKeyScripts(const CPubKey& pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore);
|
||||
|
||||
public:
|
||||
mutable CCriticalSection cs_KeyStore;
|
||||
mutable RecursiveMutex cs_KeyStore;
|
||||
|
||||
virtual bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey);
|
||||
virtual bool AddKey(const CKey &key) { return AddKeyPubKey(key, key.GetPubKey()); }
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
@ -75,7 +75,7 @@ typedef std::set<std::pair<void*, void*> > InvLockOrders;
|
|||
struct LockData {
|
||||
// Very ugly hack: as the global constructs and destructors run single
|
||||
// threaded, we use this boolean to know whether LockData still exists,
|
||||
// as DeleteLock can get called by global CCriticalSection destructors
|
||||
// as DeleteLock can get called by global RecursiveMutex destructors
|
||||
// after LockData disappears.
|
||||
bool available;
|
||||
LockData() : available(true) {}
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -106,7 +106,6 @@ public:
|
|||
* TODO: We should move away from using the recursive lock by default.
|
||||
*/
|
||||
using RecursiveMutex = AnnotatedMixin<std::recursive_mutex>;
|
||||
typedef AnnotatedMixin<std::recursive_mutex> CCriticalSection;
|
||||
|
||||
/** Wrapped mutex: supports waiting but not recursive locking */
|
||||
typedef AnnotatedMixin<std::mutex> Mutex;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
@ -51,7 +51,7 @@ struct COrphanTx {
|
|||
NodeId fromPeer;
|
||||
int64_t nTimeExpire;
|
||||
};
|
||||
extern CCriticalSection g_cs_orphans;
|
||||
extern RecursiveMutex g_cs_orphans;
|
||||
extern std::map<uint256, COrphanTx> mapOrphanTransactions GUARDED_BY(g_cs_orphans);
|
||||
|
||||
static CService ip(uint32_t i)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2012-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2012-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.
|
||||
|
||||
|
@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE(potential_deadlock_detected)
|
|||
g_debug_lockorder_abort = false;
|
||||
#endif
|
||||
|
||||
CCriticalSection rmutex1, rmutex2;
|
||||
RecursiveMutex rmutex1, rmutex2;
|
||||
TestPotentialDeadLockDetected(rmutex1, rmutex2);
|
||||
|
||||
Mutex mutex1, mutex2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2011-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.
|
||||
|
||||
|
@ -38,7 +38,7 @@ BOOST_FIXTURE_TEST_SUITE(util_tests, BasicTestingSetup)
|
|||
|
||||
BOOST_AUTO_TEST_CASE(util_criticalsection)
|
||||
{
|
||||
CCriticalSection cs;
|
||||
RecursiveMutex cs;
|
||||
|
||||
do {
|
||||
LOCK(cs);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2014-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2014-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.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
#include <warnings.h>
|
||||
|
||||
|
||||
static CCriticalSection cs_nTimeOffset;
|
||||
static RecursiveMutex cs_nTimeOffset;
|
||||
static int64_t nTimeOffset GUARDED_BY(cs_nTimeOffset) = 0;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
|||
#include <boost/signals2/signal.hpp>
|
||||
|
||||
class CBlockIndex;
|
||||
extern CCriticalSection cs_main;
|
||||
extern RecursiveMutex cs_main;
|
||||
|
||||
/** Fake height value used in Coin to signify they are only in the memory pool (since 0.8) */
|
||||
static const uint32_t MEMPOOL_HEIGHT = 0x7FFFFFFF;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2010-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2010-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.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2010 Satoshi Nakamoto
|
||||
// Copyright (c) 2012-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2012-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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2019-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2019-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2019-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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -155,7 +155,7 @@ protected:
|
|||
unsigned int m_flags;
|
||||
};
|
||||
|
||||
mutable CCriticalSection cs_args;
|
||||
mutable RecursiveMutex cs_args;
|
||||
util::Settings m_settings GUARDED_BY(cs_args);
|
||||
std::string m_network GUARDED_BY(cs_args);
|
||||
std::set<std::string> m_network_only_args GUARDED_BY(cs_args);
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -133,7 +133,7 @@ CTxMemPool mempool(&feeEstimator);
|
|||
namespace {
|
||||
CBlockIndex* pindexBestInvalid = nullptr;
|
||||
|
||||
CCriticalSection cs_LastBlockFile;
|
||||
RecursiveMutex cs_LastBlockFile;
|
||||
std::vector<CBlockFileInfo> vinfoBlockFile;
|
||||
int nLastBlockFile = 0;
|
||||
/** Global flag to indicate we should check to see if there are
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
extern CCriticalSection cs_main;
|
||||
extern RecursiveMutex cs_main;
|
||||
class BlockValidationState;
|
||||
class CBlock;
|
||||
class CBlockIndex;
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -44,7 +44,7 @@ void CheckUniqueFileid(const BerkeleyEnvironment& env, const std::string& filena
|
|||
}
|
||||
}
|
||||
|
||||
CCriticalSection cs_db;
|
||||
RecursiveMutex cs_db;
|
||||
std::map<std::string, std::weak_ptr<BerkeleyEnvironment>> g_dbenvs GUARDED_BY(cs_db); //!< Map from directory name to db environment.
|
||||
} // namespace
|
||||
|
||||
|
@ -650,7 +650,7 @@ void BerkeleyEnvironment::ReloadDbEnv()
|
|||
{
|
||||
// Make sure that no Db's are in use
|
||||
AssertLockNotHeld(cs_db);
|
||||
std::unique_lock<CCriticalSection> lock(cs_db);
|
||||
std::unique_lock<RecursiveMutex> lock(cs_db);
|
||||
m_db_in_use.wait(lock, [this](){
|
||||
for (auto& count : mapFileUseCount) {
|
||||
if (count.second > 0) return false;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 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.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2019-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.
|
||||
|
||||
|
@ -420,7 +420,7 @@ public:
|
|||
void NotifyCanGetAddressesChanged() const;
|
||||
template<typename... Params> void WalletLogPrintf(const std::string& fmt, const Params&... parameters) const;
|
||||
CWallet& m_wallet;
|
||||
CCriticalSection& cs_wallet;
|
||||
RecursiveMutex& cs_wallet;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_WALLET_SCRIPTPUBKEYMAN_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.
|
||||
|
||||
|
@ -45,7 +45,7 @@ const std::map<uint64_t,std::string> WALLET_FLAG_CAVEATS{
|
|||
|
||||
static const size_t OUTPUT_GROUP_MAX_ENTRIES = 10;
|
||||
|
||||
static CCriticalSection cs_wallets;
|
||||
static RecursiveMutex cs_wallets;
|
||||
static std::vector<std::shared_ptr<CWallet>> vpwallets GUARDED_BY(cs_wallets);
|
||||
static std::list<LoadWalletFn> g_load_wallet_fns GUARDED_BY(cs_wallets);
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
@ -699,7 +699,7 @@ public:
|
|||
* Main wallet lock.
|
||||
* This lock protects all the fields added by CWallet.
|
||||
*/
|
||||
mutable CCriticalSection cs_wallet;
|
||||
mutable RecursiveMutex cs_wallet;
|
||||
|
||||
/** Get database handle used by this wallet. Ideally this function would
|
||||
* not be necessary.
|
||||
|
@ -1133,7 +1133,7 @@ public:
|
|||
// Temporary LegacyScriptPubKeyMan accessors and aliases.
|
||||
friend class LegacyScriptPubKeyMan;
|
||||
std::unique_ptr<LegacyScriptPubKeyMan> m_spk_man = MakeUnique<LegacyScriptPubKeyMan>(*this);
|
||||
CCriticalSection& cs_KeyStore = m_spk_man->cs_KeyStore;
|
||||
RecursiveMutex& cs_KeyStore = m_spk_man->cs_KeyStore;
|
||||
LegacyScriptPubKeyMan::KeyMap& mapKeys GUARDED_BY(cs_KeyStore) = m_spk_man->mapKeys;
|
||||
LegacyScriptPubKeyMan::ScriptMap& mapScripts GUARDED_BY(cs_KeyStore) = m_spk_man->mapScripts;
|
||||
LegacyScriptPubKeyMan::CryptedKeyMap& mapCryptedKeys GUARDED_BY(cs_KeyStore) = m_spk_man->mapCryptedKeys;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2015-2019 The Bitcoin Core developers
|
||||
// Copyright (c) 2015-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.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2017-2019 The Bitcoin Core developers
|
||||
# Copyright (c) 2017-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.
|
||||
"""Test various command line arguments and configuration file parameters."""
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2020 The Bitcoin Core developers
|
||||
# Copyright (c) 2020-2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-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.
|
||||
"""Useful util functions for testing the wallet"""
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-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.
|
||||
"""Test the avoid_reuse and setwalletflag features."""
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2018-2019 The Bitcoin Core developers
|
||||
# Copyright (c) 2018-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.
|
||||
"""Test the behavior of RPC importprivkey on set and unset labels of
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2016-2019 The Bitcoin Core developers
|
||||
# Copyright (c) 2016-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.
|
||||
"""Test label RPCs.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2018 The Bitcoin Core developers
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
#
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (c) 2019-2018 The Bitcoin Core developers
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue