Skip to content

Commit f9002cb

Browse files
committed
[net] Rename the copyStats arg from m_asmap to asmap
The m_ prefix indicates that a variable is a data member. Using it as a parameter name is misleading. Also update the name of the function from copyStats to CopyStats to comply with our style guide.
1 parent f572f2b commit f9002cb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/net.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -567,14 +567,14 @@ Network CNode::ConnectedThroughNetwork() const
567567

568568
#undef X
569569
#define X(name) stats.name = name
570-
void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap)
570+
void CNode::CopyStats(CNodeStats& stats, const std::vector<bool>& asmap)
571571
{
572572
stats.nodeid = this->GetId();
573573
X(nServices);
574574
X(addr);
575575
X(addrBind);
576576
stats.m_network = ConnectedThroughNetwork();
577-
stats.m_mapped_as = addr.GetMappedAS(m_asmap);
577+
stats.m_mapped_as = addr.GetMappedAS(asmap);
578578
if (m_tx_relay != nullptr) {
579579
LOCK(m_tx_relay->cs_filter);
580580
stats.fRelayTxes = m_tx_relay->fRelayTxes;
@@ -2819,7 +2819,7 @@ void CConnman::GetNodeStats(std::vector<CNodeStats>& vstats) const
28192819
vstats.reserve(vNodes.size());
28202820
for (CNode* pnode : vNodes) {
28212821
vstats.emplace_back();
2822-
pnode->copyStats(vstats.back(), addrman.m_asmap);
2822+
pnode->CopyStats(vstats.back(), addrman.m_asmap);
28232823
}
28242824
}
28252825

src/net.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ class CNode
651651

652652
void CloseSocketDisconnect();
653653

654-
void copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap);
654+
void CopyStats(CNodeStats& stats, const std::vector<bool>& asmap);
655655

656656
ServiceFlags GetLocalServices() const
657657
{

src/test/fuzz/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ FUZZ_TARGET_INIT(net, initialize_net)
4646
return;
4747
}
4848
CNodeStats stats;
49-
node.copyStats(stats, asmap);
49+
node.CopyStats(stats, asmap);
5050
},
5151
[&] {
5252
const CNode* add_ref_node = node.AddRef();

0 commit comments

Comments
 (0)