[][src]Struct grin_p2p::Peer

pub struct Peer {
    pub info: PeerInfo,
    // some fields omitted
}

Fields

Methods

impl Peer
[src]

Main peer loop listening for messages and forwarding to the rest of the system.

Whether this peer is still connected.

Whether this peer has been banned.

Whether this peer is stuck on sync.

Whether the peer is considered abusive, mostly for spammy nodes

Number of bytes sent to the peer

Number of bytes received from the peer

Set this peer status to banned

Send a ping to the remote peer, providing our local difficulty and height

Send the ban reason before banning

Sends the provided block to the remote peer. The request may be dropped if the remote peer is known to already have the block.

Sends the provided transaction to the remote peer. The request may be dropped if the remote peer is known to already have the transaction. We support broadcast of lightweight tx kernel hash so track known txs by kernel hash.

Sends the provided stem transaction to the remote peer. Note: tracking adapter is ignored for stem transactions (while under embargo).

Sends a request for block headers from the provided block locator

Sends a request for a specific block by hash

Sends a request for a specific compact block by hash

Stops the peer, closing its connection

Auto Trait Implementations

impl Send for Peer

impl Sync for Peer

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> UnsafeAny for T where
    T: Any

impl<T> Erased for T

impl<T> Same for T

Should always be Self

impl<T> SafeBorrow for T where
    T: ?Sized