aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net.cpp1
-rw-r--r--src/net.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 54d572c68c..5db7fc9e73 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -552,6 +552,7 @@ void CNode::copyStats(CNodeStats &stats, const std::vector<bool> &m_asmap)
X(nServices);
X(addr);
X(addrBind);
+ stats.m_network = GetNetworkName(ConnectedThroughNetwork());
stats.m_mapped_as = addr.GetMappedAS(m_asmap);
if (m_tx_relay != nullptr) {
LOCK(m_tx_relay->cs_filter);
diff --git a/src/net.h b/src/net.h
index 7c63516394..eec48a7e95 100644
--- a/src/net.h
+++ b/src/net.h
@@ -706,6 +706,8 @@ public:
CAddress addr;
// Bind address of our side of the connection
CAddress addrBind;
+ // Name of the network the peer connected through
+ std::string m_network;
uint32_t m_mapped_as;
std::string m_conn_type_string;
};