pub struct BootstrapState {
pub drained: bool,
pub pending_peer_requests: usize,
pub pending_keys: HashSet<XorName>,
}Expand description
Bootstrap drain state tracking (Section 16).
Fields§
§drained: boolWhether bootstrap is complete (all peer requests done, queues empty).
pending_peer_requests: usizeNumber of bootstrap peer requests still pending.
pending_keys: HashSet<XorName>Keys discovered during bootstrap that are still in the verification / fetch pipeline.
Implementations§
Source§impl BootstrapState
impl BootstrapState
Sourcepub fn is_drained(&self) -> bool
pub fn is_drained(&self) -> bool
Check if bootstrap is drained.
Only returns true after super::bootstrap::check_bootstrap_drained or
super::bootstrap::mark_bootstrap_drained has explicitly set the flag. A fresh
BootstrapState is NOT drained — the audit loop must wait until
bootstrap work has actually completed (Invariant 19).
Sourcepub fn remove_key(&mut self, key: &XorName)
pub fn remove_key(&mut self, key: &XorName)
Remove a key from the bootstrap pending set.
Called when a key terminally leaves the verification/fetch pipeline (stored, abandoned, quorum failed, etc.) so the drain check set shrinks incrementally rather than being re-scanned in full.
Trait Implementations§
Source§impl Debug for BootstrapState
impl Debug for BootstrapState
Auto Trait Implementations§
impl Freeze for BootstrapState
impl RefUnwindSafe for BootstrapState
impl Send for BootstrapState
impl Sync for BootstrapState
impl Unpin for BootstrapState
impl UnsafeUnpin for BootstrapState
impl UnwindSafe for BootstrapState
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
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>
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>
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