Our current ConnectionKind enum isn't compliant with core, as stated in #622.
Core define some connection types:
"connection_type" : "str", (string) Type of connection:
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).
A important warning is:
Please note this output is unlikely to be stable in upcoming releases as we iterate to best capture connection behaviors.
IMO, it's worth to change to something like this, changing Regular and Extra to more defined ones:
#[derive(Debug, PartialEq, Clone, Copy)]
/// Type of connection.
pub enum ConnectionKind {
/// Old Regular type: default automatic connections.
OutboundFullRelay(ServiceFlags),
/// Old extra type: Does not relay transactions or addresses
BlockRelayOnly(ServiceFlags),
/// Old extra type: Initiated by the peer
Inbound(ServiceFlags),
/// Old extra type: added via addnode RPC or -addnode/-connect configuration options
Manual(ServiceFlags),
/// Old feeler addresses (?): Short-lived automatic connection for soliciting addresses
AddrFetch,
/// Short-lived automatic connection for testing addresses
Feeler,
}
But idk if this is tottally possible or what is possible in our current implementation. So it will be nice to hear the options.
Our current
ConnectionKindenum isn't compliant with core, as stated in #622.Core define some connection types:
A important warning is:
IMO, it's worth to change to something like this, changing
RegularandExtrato more defined ones:But idk if this is tottally possible or what is possible in our current implementation. So it will be nice to hear the options.