Struct bitcoincore_rpc_json::GetPeerInfoResult

source ·
pub struct GetPeerInfoResult {
Show 32 fields pub id: u64, pub addr: String, pub addrbind: String, pub addrlocal: Option<String>, pub network: Option<GetPeerInfoResultNetwork>, pub services: String, pub relaytxes: bool, pub lastsend: u64, pub lastrecv: u64, pub last_transaction: Option<u64>, pub last_block: Option<u64>, pub bytessent: u64, pub bytesrecv: u64, pub conntime: u64, pub timeoffset: i64, pub pingtime: Option<f64>, pub minping: Option<f64>, pub pingwait: Option<f64>, pub version: u64, pub subver: String, pub inbound: bool, pub addnode: Option<bool>, pub startingheight: i64, pub banscore: Option<i64>, pub synced_headers: i64, pub synced_blocks: i64, pub inflight: Vec<u64>, pub whitelisted: Option<bool>, pub min_fee_filter: Option<Amount>, pub bytessent_per_msg: HashMap<String, u64>, pub bytesrecv_per_msg: HashMap<String, u64>, pub connection_type: Option<GetPeerInfoResultConnectionType>,
}
Expand description

Models the result of “getpeerinfo”

Fields§

§id: u64

Peer index

§addr: String

The IP address and port of the peer

§addrbind: String

Bind address of the connection to the peer

§addrlocal: Option<String>

Local address as reported by the peer

§network: Option<GetPeerInfoResultNetwork>

Network (ipv4, ipv6, or onion) the peer connected through Added in Bitcoin Core v0.21

§services: String

The services offered

§relaytxes: bool

Whether peer has asked us to relay transactions to it

§lastsend: u64

The time in seconds since epoch (Jan 1 1970 GMT) of the last send

§lastrecv: u64

The time in seconds since epoch (Jan 1 1970 GMT) of the last receive

§last_transaction: Option<u64>

The time in seconds since epoch (Jan 1 1970 GMT) of the last valid transaction received from this peer Added in Bitcoin Core v0.21

§last_block: Option<u64>

The time in seconds since epoch (Jan 1 1970 GMT) of the last block received from this peer Added in Bitcoin Core v0.21

§bytessent: u64

The total bytes sent

§bytesrecv: u64

The total bytes received

§conntime: u64

The connection time in seconds since epoch (Jan 1 1970 GMT)

§timeoffset: i64

The time offset in seconds

§pingtime: Option<f64>

ping time (if available)

§minping: Option<f64>

minimum observed ping time (if any at all)

§pingwait: Option<f64>

ping wait (if non-zero)

§version: u64

The peer version, such as 70001

§subver: String

The string version

§inbound: bool

Inbound (true) or Outbound (false)

§addnode: Option<bool>

Whether connection was due to addnode/-connect or if it was an automatic/inbound connection Deprecated in Bitcoin Core v0.21

§startingheight: i64

The starting height (block) of the peer

§banscore: Option<i64>

The ban score Deprecated in Bitcoin Core v0.21

§synced_headers: i64

The last header we have in common with this peer

§synced_blocks: i64

The last block we have in common with this peer

§inflight: Vec<u64>

The heights of blocks we’re currently asking from this peer

§whitelisted: Option<bool>

Whether the peer is whitelisted Deprecated in Bitcoin Core v0.21

§min_fee_filter: Option<Amount>§bytessent_per_msg: HashMap<String, u64>

The total bytes sent aggregated by message type

§bytesrecv_per_msg: HashMap<String, u64>

The total bytes received aggregated by message type

§connection_type: Option<GetPeerInfoResultConnectionType>

The type of the connection Added in Bitcoin Core v0.21

Trait Implementations§

source§

impl Clone for GetPeerInfoResult

source§

fn clone(&self) -> GetPeerInfoResult

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GetPeerInfoResult

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GetPeerInfoResult

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for GetPeerInfoResult

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,