mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 15:32:34 +02:00
scripted-diff: rename cs_SubVer
-> m_subver_mutex
-BEGIN VERIFY SCRIPT- sed -i 's/cs_SubVer/m_subver_mutex/g' ./src/net.h ./src/net.cpp ./src/net_processing.cpp -END VERIFY SCRIPT-
This commit is contained in:
parent
807169e10b
commit
0639aba42a
@ -595,7 +595,7 @@ void CNode::CopyStats(CNodeStats& stats)
|
|||||||
X(m_addr_name);
|
X(m_addr_name);
|
||||||
X(nVersion);
|
X(nVersion);
|
||||||
{
|
{
|
||||||
LOCK(cs_SubVer);
|
LOCK(m_subver_mutex);
|
||||||
X(cleanSubVer);
|
X(cleanSubVer);
|
||||||
}
|
}
|
||||||
stats.fInbound = IsInboundConn();
|
stats.fInbound = IsInboundConn();
|
||||||
|
@ -434,12 +434,12 @@ public:
|
|||||||
//! Whether this peer is an inbound onion, i.e. connected via our Tor onion service.
|
//! Whether this peer is an inbound onion, i.e. connected via our Tor onion service.
|
||||||
const bool m_inbound_onion;
|
const bool m_inbound_onion;
|
||||||
std::atomic<int> nVersion{0};
|
std::atomic<int> nVersion{0};
|
||||||
RecursiveMutex cs_SubVer;
|
RecursiveMutex m_subver_mutex;
|
||||||
/**
|
/**
|
||||||
* cleanSubVer is a sanitized string of the user agent byte array we read
|
* cleanSubVer is a sanitized string of the user agent byte array we read
|
||||||
* from the wire. This cleaned string can safely be logged or displayed.
|
* from the wire. This cleaned string can safely be logged or displayed.
|
||||||
*/
|
*/
|
||||||
std::string cleanSubVer GUARDED_BY(cs_SubVer){};
|
std::string cleanSubVer GUARDED_BY(m_subver_mutex){};
|
||||||
bool m_prefer_evict{false}; // This peer is preferred for eviction.
|
bool m_prefer_evict{false}; // This peer is preferred for eviction.
|
||||||
bool HasPermission(NetPermissionFlags permission) const {
|
bool HasPermission(NetPermissionFlags permission) const {
|
||||||
return NetPermissions::HasFlag(m_permissionFlags, permission);
|
return NetPermissions::HasFlag(m_permissionFlags, permission);
|
||||||
|
@ -2636,7 +2636,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||||||
pfrom.nServices = nServices;
|
pfrom.nServices = nServices;
|
||||||
pfrom.SetAddrLocal(addrMe);
|
pfrom.SetAddrLocal(addrMe);
|
||||||
{
|
{
|
||||||
LOCK(pfrom.cs_SubVer);
|
LOCK(pfrom.m_subver_mutex);
|
||||||
pfrom.cleanSubVer = cleanSubVer;
|
pfrom.cleanSubVer = cleanSubVer;
|
||||||
}
|
}
|
||||||
peer->m_starting_height = starting_height;
|
peer->m_starting_height = starting_height;
|
||||||
|
Loading…
Reference in New Issue
Block a user