Skip to content

Commit 0639aba

Browse files
committed
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-
1 parent 807169e commit 0639aba

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ void CNode::CopyStats(CNodeStats& stats)
595595
X(m_addr_name);
596596
X(nVersion);
597597
{
598-
LOCK(cs_SubVer);
598+
LOCK(m_subver_mutex);
599599
X(cleanSubVer);
600600
}
601601
stats.fInbound = IsInboundConn();

src/net.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,12 @@ class CNode
434434
//! Whether this peer is an inbound onion, i.e. connected via our Tor onion service.
435435
const bool m_inbound_onion;
436436
std::atomic<int> nVersion{0};
437-
RecursiveMutex cs_SubVer;
437+
RecursiveMutex m_subver_mutex;
438438
/**
439439
* cleanSubVer is a sanitized string of the user agent byte array we read
440440
* from the wire. This cleaned string can safely be logged or displayed.
441441
*/
442-
std::string cleanSubVer GUARDED_BY(cs_SubVer){};
442+
std::string cleanSubVer GUARDED_BY(m_subver_mutex){};
443443
bool m_prefer_evict{false}; // This peer is preferred for eviction.
444444
bool HasPermission(NetPermissionFlags permission) const {
445445
return NetPermissions::HasFlag(m_permissionFlags, permission);

src/net_processing.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
26362636
pfrom.nServices = nServices;
26372637
pfrom.SetAddrLocal(addrMe);
26382638
{
2639-
LOCK(pfrom.cs_SubVer);
2639+
LOCK(pfrom.m_subver_mutex);
26402640
pfrom.cleanSubVer = cleanSubVer;
26412641
}
26422642
peer->m_starting_height = starting_height;

0 commit comments

Comments
 (0)