aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-10-15 17:44:21 +0200
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-10-15 17:44:38 +0200
commit0d22482353752ebfb11aa29f4b26113b817a448a (patch)
tree5a3ca63a82d842744e5361a7c9aaa91090e4085c /src/net.h
parent711ddce94377aea38ce30fa93b3ee8ea1d96ba98 (diff)
parent6272604bef3b409455b010d134b4b62c8f6ff49f (diff)
downloadbitcoin-0d22482353752ebfb11aa29f4b26113b817a448a.tar.xz
Merge #20002: net, rpc, cli: expose peer network in getpeerinfo; simplify/improve -netinfo
6272604bef3b409455b010d134b4b62c8f6ff49f refactor: enable -netinfo to add future networks (i2p, cjdns) (Jon Atack) 82fd40216c70037480150d2b62e2b58c57784546 refactor: promote some -netinfo localvars to class members (Jon Atack) 5133fab37e8679e1d0d08ead4f5cccf4979dc15b cli: simplify -netinfo using getpeerinfo network field (Jon Atack) 4938a109adf13f2c60a50f08d4cc9ddb8d7ded96 rpc, test: expose CNodeStats network in RPC getpeerinfo (Jon Atack) 6df7882029854f0427d84b22081018ae77e27e66 net: add peer network to CNodeStats (Jon Atack) Pull request description: This PR: - builds on #19991 and #19998 - exposes peer networks via a new getpeerinfo `network` field ("ipv4", "ipv6", or "onion"), and adds functional tests - updates -netinfo to use getpeerinfo `network` rather than detecting the peer networks client-side - refactors -netinfo to easily add future networks ACKs for top commit: laanwj: ACK 6272604bef3b409455b010d134b4b62c8f6ff49f Tree-SHA512: 28883487585135ceaaf84ce09131f2336e3193407f2e3df0960e3f4ac340f500ab94ffecb9d06a4c49bc05e3cca4f914ea4379860bea0bd5df2f834f74616015
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 4ba872d02c..fb5c2bd328 100644
--- a/src/net.h
+++ b/src/net.h
@@ -705,6 +705,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;
};