pub struct PeerInfo {
pub id: u32,
pub address: String,
pub services: String,
pub user_agent: String,
pub initial_height: u32,
pub kind: String,
pub state: String,
pub transport_protocol: String,
}Expand description
General information about our peers. Returned by get_peer_info
Fields§
§id: u32This peer’s ID in the peer manager.
address: StringThe network address for this peer.
services: StringA string with the services this peer advertises. E.g. NODE_NETWORK, UTREEXO, WITNESS…
user_agent: StringUser agent is a string that represents the client being used by our peer. E.g. /Satoshi-26.0/ for bitcoin core version 26
initial_height: u32This peer’s height at the time we’ve opened a connection with them
kind: StringThe connection type of this peer
We can connect with peers for different reasons. E.g. we can connect to a peer to see if it has a block we’re missing, or just to check if that address is still alive. Possible values are: Feeler, Regular and Extra
state: StringThe state of this peer
Can be either Ready, Connecting or Banned
transport_protocol: StringThe transport protocol used with peer.