aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-06-02 11:43:57 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2020-08-07 17:18:16 -0700
commit46578c03e92a55925308363ccdad04dcfc820d96 (patch)
tree2384901aab8546864c70a022b498f83b1611067c /src/net.h
parent442abae2bac7bff85886143df01e14215532b974 (diff)
downloadbitcoin-46578c03e92a55925308363ccdad04dcfc820d96.tar.xz
[doc] Describe different connection types
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/net.h b/src/net.h
index 269877b21e..6a4ef6ab4b 100644
--- a/src/net.h
+++ b/src/net.h
@@ -113,13 +113,16 @@ struct CSerializedNetMsg
std::string m_type;
};
+/** 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. */
enum class ConnectionType {
- INBOUND,
- OUTBOUND,
- MANUAL,
- FEELER,
- BLOCK_RELAY,
- ADDR_FETCH,
+ INBOUND, /**< peer initiated connections */
+ OUTBOUND, /**< full relay connections (blocks, addrs, txns) made automatically. Addresses selected from AddrMan. */
+ MANUAL, /**< connections to addresses added via addnode or the connect command line argument */
+ FEELER, /**< short lived connections used to test address validity */
+ BLOCK_RELAY, /**< only relay blocks to these automatic outbound connections. Addresses selected from AddrMan. */
+ ADDR_FETCH, /**< short lived connections used to solicit addrs when starting the node without a populated AddrMan */
};
class NetEventsInterface;