aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-08-12 13:57:13 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2020-09-21 19:01:29 -0700
commit395acfa83a5436790c1a722a5609ac9d48df235f (patch)
tree523f1a77f69da9ff7e44f4bc602bbaf2dc14aa2b /src/net.h
parent49c10a9ca40967d28ae16dfea9cccc6f3a6624a1 (diff)
downloadbitcoin-395acfa83a5436790c1a722a5609ac9d48df235f.tar.xz
[rpc] Add connection type to getpeerinfo RPC, update tests
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 61a208802c..5e134ca7c8 100644
--- a/src/net.h
+++ b/src/net.h
@@ -114,6 +114,14 @@ struct CSerializedNetMsg
std::string m_type;
};
+const std::vector<std::string> CONNECTION_TYPE_DOC{
+ "outbound-full-relay (default automatic connections)",
+ "block-relay-only (does not relay transactions or addresses)",
+ "inbound (initiated by the peer)",
+ "manual (added via addnode RPC or -addnode/-connect configuration options)",
+ "addr-fetch (short-lived automatic connection for soliciting addresses)",
+ "feeler (short-lived automatic connection for testing addresses)"};
+
/** Different types of connections to a peer. This enum encapsulates the
* information we have available at the time of opening or accepting the
* connection. Aside from INBOUND, all types are initiated by us. */
@@ -692,6 +700,7 @@ public:
// Bind address of our side of the connection
CAddress addrBind;
uint32_t m_mapped_as;
+ std::string m_conn_type_string;
};