pub struct NeighborSyncState {
pub order: Vec<PeerId>,
pub cursor: usize,
pub last_sync_times: HashMap<PeerId, Instant>,
pub bootstrap_claims: HashMap<PeerId, Instant>,
}Expand description
Neighbor sync cycle state.
Tracks a deterministic walk through the current close-group snapshot, per-peer cooldown times, and bootstrap claim first-seen timestamps.
Fields§
§order: Vec<PeerId>Deterministic ordering of peers for the current cycle (snapshot).
cursor: usizeCurrent cursor position into order.
last_sync_times: HashMap<PeerId, Instant>Per-peer last successful sync time (for cooldown).
bootstrap_claims: HashMap<PeerId, Instant>Bootstrap claim first-seen timestamps per peer.
Entries are removed when a peer passes or fails audit (i.e. stops claiming bootstrap). Under Sybil attack with many distinct peer IDs perpetually claiming bootstrap, this map grows unboundedly. In practice the trust engine limits Sybil impact before this becomes a memory issue.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NeighborSyncState
impl RefUnwindSafe for NeighborSyncState
impl Send for NeighborSyncState
impl Sync for NeighborSyncState
impl Unpin for NeighborSyncState
impl UnsafeUnpin for NeighborSyncState
impl UnwindSafe for NeighborSyncState
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
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