pub struct DeadSlotAncestorRequestStatus { /* private fields */ }
Implementations§
source§impl DeadSlotAncestorRequestStatus
impl DeadSlotAncestorRequestStatus
pub fn new( sampled_validators: impl Iterator<Item = SocketAddr>, requested_mismatched_slot: Slot ) -> Self
sourcepub fn add_response(
&mut self,
from_addr: &SocketAddr,
response_slot_hashes: Vec<(Slot, Hash)>,
blockstore: &Blockstore
) -> Option<DuplicateAncestorDecision>
pub fn add_response( &mut self, from_addr: &SocketAddr, response_slot_hashes: Vec<(Slot, Hash)>, blockstore: &Blockstore ) -> Option<DuplicateAncestorDecision>
Record the response from from_addr
. Returns Some(DuplicateAncestorDecision)
if we have finalized a decision based on the responses. We can finalize a decision when
one of the following conditions is met:
- We have heard from all the validators, OR
-
= MINIMUM_ANCESTOR_AGREEMENT_SIZE have agreed that we have the correct versions of nth ancestor, for some
n>0
, AND >= MINIMUM_ANCESTOR_AGREEMENT_SIZE have agreed we have the wrong version of then-1
ancestor.
sourcepub fn is_expired(&self) -> bool
pub fn is_expired(&self) -> bool
Given a timestamp in milliseconds, return if we should retry with another sample batch due to timeout
Trait Implementations§
source§impl Clone for DeadSlotAncestorRequestStatus
impl Clone for DeadSlotAncestorRequestStatus
source§fn clone(&self) -> DeadSlotAncestorRequestStatus
fn clone(&self) -> DeadSlotAncestorRequestStatus
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for DeadSlotAncestorRequestStatus
impl Default for DeadSlotAncestorRequestStatus
source§fn default() -> DeadSlotAncestorRequestStatus
fn default() -> DeadSlotAncestorRequestStatus
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for DeadSlotAncestorRequestStatus
impl Send for DeadSlotAncestorRequestStatus
impl Sync for DeadSlotAncestorRequestStatus
impl Unpin for DeadSlotAncestorRequestStatus
impl UnwindSafe for DeadSlotAncestorRequestStatus
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request