pub struct PointerReplication { /* private fields */ }Expand description
Pointer replication for one node. See the module documentation.
Implementations§
Source§impl PointerReplication
impl PointerReplication
Sourcepub fn is_capable(&self, peer: &PeerId) -> bool
pub fn is_capable(&self, peer: &PeerId) -> bool
Whether peer has sent a pointer message, and may therefore be asked.
Sourcepub async fn push_hints(&self, peers: &[PeerId])
pub async fn push_hints(&self, peers: &[PeerId])
Push hints to peers and wait until they are sent. This is what each
neighbour-sync round runs in the background; tests call it to drive a
round.
Sourcepub async fn verify_due(&self)
pub async fn verify_due(&self)
Verify and fetch whatever is due now. Also the tests’ way to drive it.
Sourcepub async fn replicate_fresh(self: &Arc<Self>, write: PointerFreshWrite)
pub async fn replicate_fresh(self: &Arc<Self>, write: PointerFreshWrite)
Offer a freshly paid state to the rest of its close group, and schedule the check that they took it.
Sourcepub async fn check_possession(&self, fresh: PointerState, peers: &[PeerId])
pub async fn check_possession(&self, fresh: PointerState, peers: &[PeerId])
Ask each peer for the record, and penalise any still responsible for it
that cannot produce fresh or a state that replaces it.
Sourcepub async fn prune_pass(
&self,
allow_remote: bool,
commitment_state: Option<&ResponderCommitmentState>,
)
pub async fn prune_pass( &self, allow_remote: bool, commitment_state: Option<&ResponderCommitmentState>, )
Delete records this node has been out of range of for the hysteresis period, where that is safe. Run when a neighbour-sync cycle completes.
allow_remote is false while bootstrapping: candidacy is still tracked,
but nothing that needs other peers’ proof is decided.
A record a retained storage commitment still commits to is never deleted, exactly as for a chunk: an auditor pinning that commitment may still open it, and a node that deleted it would fail that audit.
Auto Trait Implementations§
impl !Freeze for PointerReplication
impl !RefUnwindSafe for PointerReplication
impl !UnwindSafe for PointerReplication
impl Send for PointerReplication
impl Sync for PointerReplication
impl Unpin for PointerReplication
impl UnsafeUnpin for PointerReplication
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§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> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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