pub struct PeerInfo {Show 27 fields
pub id: u32,
pub address: String,
pub address_bind: String,
pub address_local: String,
pub services: String,
pub relay_transactions: bool,
pub last_send: u32,
pub last_received: u32,
pub bytes_sent: u64,
pub bytes_received: u64,
pub connection_time: u32,
pub time_offset: u32,
pub ping_time: u32,
pub minimum_ping: u32,
pub ping_wait: u32,
pub version: u32,
pub subversion: String,
pub inbound: bool,
pub add_node: bool,
pub starting_height: u32,
pub ban_score: u64,
pub synced_headers: u32,
pub synced_blocks: u32,
pub inflight: Vec<u32>,
pub whitelisted: bool,
pub bytes_sent_per_message: BTreeMap<String, u64>,
pub bytes_received_per_message: BTreeMap<String, u64>,
}Expand description
An item from the list returned by the JSON-RPC method getpeerinfo.
Fields§
§id: u32Peer index.
address: StringThe IP address and port of the peer (“host:port”).
address_bind: StringBind address of the connection to the peer (“ip:port”).
address_local: StringLocal address as reported by the peer.
services: StringThe services offered.
relay_transactions: boolWhether peer has asked us to relay transactions to it.
last_send: u32The time in seconds since epoch (Jan 1 1970 GMT) of the last send.
last_received: u32The time in seconds since epoch (Jan 1 1970 GMT) of the last receive.
bytes_sent: u64The total bytes sent.
bytes_received: u64The total bytes received.
connection_time: u32The connection time in seconds since epoch (Jan 1 1970 GMT).
time_offset: u32The time offset in seconds.
ping_time: u32Ping time (if available).
minimum_ping: u32Minimum observed ping time (if any at all).
ping_wait: u32Ping wait (if non-zero).
version: u32The peer version, such as 70001.
subversion: StringThe string version (e.g. “/Satoshi:0.8.5/”).
inbound: boolInbound (true) or Outbound (false).
add_node: boolWhether connection was due to addnode/-connect or if it was an automatic/inbound connection.
starting_height: u32The starting height (block) of the peer.
ban_score: u64The ban score.
synced_headers: u32The last header we have in common with this peer.
synced_blocks: u32The last block we have in common with this peer.
inflight: Vec<u32>The heights of blocks we’re currently asking from this peer.
whitelisted: boolWhether the peer is whitelisted.
bytes_sent_per_message: BTreeMap<String, u64>The total bytes sent aggregated by message type.
bytes_received_per_message: BTreeMap<String, u64>The total bytes received aggregated by message type.