net: add peer network to CNodeStats

This commit is contained in:
Jon Atack 2020-09-23 10:23:44 +02:00
parent f79a4a8952
commit 6df7882029
No known key found for this signature in database
GPG key ID: 4F5721B3D0E3921D
2 changed files with 3 additions and 0 deletions

View file

@ -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);

View file

@ -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;
};