Skip to content

Commit 6df7882

Browse files
committed
net: add peer network to CNodeStats
1 parent f79a4a8 commit 6df7882

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/net.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap)
552552
X(nServices);
553553
X(addr);
554554
X(addrBind);
555+
stats.m_network = GetNetworkName(ConnectedThroughNetwork());
555556
stats.m_mapped_as = addr.GetMappedAS(m_asmap);
556557
if (m_tx_relay != nullptr) {
557558
LOCK(m_tx_relay->cs_filter);

src/net.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,8 @@ class CNodeStats
706706
CAddress addr;
707707
// Bind address of our side of the connection
708708
CAddress addrBind;
709+
// Name of the network the peer connected through
710+
std::string m_network;
709711
uint32_t m_mapped_as;
710712
std::string m_conn_type_string;
711713
};

0 commit comments

Comments
 (0)