mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-20 14:05:23 +01:00
[doc] Describe connection types in more depth.
This commit is contained in:
parent
4829b6fcc6
commit
d5a57cef62
1 changed files with 48 additions and 6 deletions
54
src/net.h
54
src/net.h
|
@ -118,12 +118,54 @@ struct CSerializedNetMsg
|
|||
* 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, /**< peer initiated connections */
|
||||
OUTBOUND_FULL_RELAY, /**< 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 */
|
||||
/**
|
||||
* Inbound connections are those initiated by a peer. This is the only
|
||||
* property we know at the time of connection, until P2P messages are
|
||||
* exchanged.
|
||||
*/
|
||||
INBOUND,
|
||||
|
||||
/**
|
||||
* These are the default connections that we use to connect with the
|
||||
* network. There is no restriction on what is relayed- by default we relay
|
||||
* blocks, addresses & transactions. We automatically attempt to open
|
||||
* MAX_OUTBOUND_FULL_RELAY_CONNECTIONS using addresses from our AddrMan.
|
||||
*/
|
||||
OUTBOUND_FULL_RELAY,
|
||||
|
||||
|
||||
/**
|
||||
* We open manual connections to addresses that users explicitly inputted
|
||||
* via the addnode RPC, or the -connect command line argument. Even if a
|
||||
* manual connection is misbehaving, we do not automatically disconnect or
|
||||
* add it to our discouragement filter.
|
||||
*/
|
||||
MANUAL,
|
||||
|
||||
/**
|
||||
* Feeler connections are short lived connections used to increase the
|
||||
* number of connectable addresses in our AddrMan. Approximately every
|
||||
* FEELER_INTERVAL, we attempt to connect to a random address from the new
|
||||
* table. If successful, we add it to the tried table.
|
||||
*/
|
||||
FEELER,
|
||||
|
||||
/**
|
||||
* We use block-relay-only connections to help prevent against partition
|
||||
* attacks. By not relaying transactions or addresses, these connections
|
||||
* are harder to detect by a third party, thus helping obfuscate the
|
||||
* network topology. We automatically attempt to open
|
||||
* MAX_BLOCK_RELAY_ONLY_CONNECTIONS using addresses from our AddrMan.
|
||||
*/
|
||||
BLOCK_RELAY,
|
||||
|
||||
/**
|
||||
* AddrFetch connections are short lived connections used to solicit
|
||||
* addresses from peers. These are initiated to addresses submitted via the
|
||||
* -seednode command line argument, or under certain conditions when the
|
||||
* AddrMan is empty.
|
||||
*/
|
||||
ADDR_FETCH,
|
||||
};
|
||||
|
||||
class NetEventsInterface;
|
||||
|
|
Loading…
Add table
Reference in a new issue