pub struct CandidatePeer<N: Network> {
pub listener_addr: SocketAddr,
pub trusted: bool,
pub last_height_seen: Option<u32>,
pub last_connection_attempt: Option<Instant>,
pub total_connection_attempts: u32,
pub last_known_aleo_addr: Option<Address<N>>,
}Expand description
A candidate peer.
Fields§
§listener_addr: SocketAddrThe listening address of a candidate peer.
trusted: boolIndicates whether the peer is considered trusted.
last_height_seen: Option<u32>The latest block height known to be associated with the peer.
last_connection_attempt: Option<Instant>The last time we attempted to connect to the peer.
None if there was no attempt to connect since the peer was last connected, or no attempt at all.
total_connection_attempts: u32The total number of connection attempts, since the peer was last connected.
last_known_aleo_addr: Option<Address<N>>The last known Aleo address of this peer, carried over from a prior connection. Used to detect when a validator reconnects from a different IP address.
Trait Implementations§
Auto Trait Implementations§
impl<N> Freeze for CandidatePeer<N>
impl<N> RefUnwindSafe for CandidatePeer<N>
impl<N> Send for CandidatePeer<N>
impl<N> Sync for CandidatePeer<N>
impl<N> Unpin for CandidatePeer<N>
impl<N> UnsafeUnpin for CandidatePeer<N>
impl<N> UnwindSafe for CandidatePeer<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more