Bitcoin Core  26.1.0
P2P Digital Currency
connection_types.h
Go to the documentation of this file.
1 // Copyright (c) 2022 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_NODE_CONNECTION_TYPES_H
6 #define BITCOIN_NODE_CONNECTION_TYPES_H
7 
8 #include <string>
9 #include <stdint.h>
10 
18 enum class ConnectionType {
24  INBOUND,
25 
33 
34 
41  MANUAL,
42 
58  FEELER,
59 
70 
77  ADDR_FETCH,
78 };
79 
81 std::string ConnectionTypeAsString(ConnectionType conn_type);
82 
84 enum class TransportProtocolType : uint8_t {
85  DETECTING,
86  V1,
87  V2,
88 };
89 
91 std::string TransportTypeAsString(TransportProtocolType transport_type);
92 
93 #endif // BITCOIN_NODE_CONNECTION_TYPES_H
BIP324 protocol.
AddrFetch connections are short lived connections used to solicit addresses from peers.
Inbound connections are those initiated by a peer.
Unencrypted, plaintext protocol.
Feeler connections are short-lived connections made to check that a node is alive.
TransportProtocolType
Transport layer version.
These are the default connections that we use to connect with the network.
We open manual connections to addresses that users explicitly requested via the addnode RPC or the -a...
std::string ConnectionTypeAsString(ConnectionType conn_type)
Convert ConnectionType enum to a string value.
Peer could be v1 or v2.
std::string TransportTypeAsString(TransportProtocolType transport_type)
Convert TransportProtocolType enum to a string value.
ConnectionType
Different types of connections to a peer.
We use block-relay-only connections to help prevent against partition attacks.