pub enum ConnectionKind {
Feeler,
Regular(ServiceFlags),
Extra,
Manual,
}Expand description
The kind of connection we see this peer as.
Core’s counterpart: https://github.com/bitcoin/bitcoin/blob/bf9ef4f0433551e850a11c2da8baae0ec6439a99/src/node/connection_types.h#L18.
Variants§
Feeler
A feeler connection is a short-lived connection used to check whether this peer is alive.
After handshake, we ask for addresses and when we receive an answer we just disconnect, marking this peer as alive in our address manager.
Regular(ServiceFlags)
A regular peer, used to send requests to and learn about transactions and blocks.
Extra
An extra peer specially created if our tip hasn’t moved for too long.
If more than NodeContext::ASSUME_STALE seconds have passed since the
last processed block, we use this to make sure we are not in a partitioned subnet,
unable to learn about new blocks.
Manual
A connection that was manually requested by our user. This type of peer won’t be banned on
misbehaving, and won’t respect the [ServiceFlags] requirements when creating a
connection.
Trait Implementations§
Source§impl Clone for ConnectionKind
impl Clone for ConnectionKind
Source§fn clone(&self) -> ConnectionKind
fn clone(&self) -> ConnectionKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more