pub struct OverlayCommitSource { /* private fields */ }Expand description
Tries one window of the current overlay peers (configured, then live) per fetch; successive fetches move to the next window, so every peer is visited. verify_parent binds bytes to the TXID; a peer whose bytes fail it only lets the next peer be tried and is disconnected so it keeps no slot. Engine verification is final.
Trait Implementations§
Source§impl CommitSource for OverlayCommitSource
impl CommitSource for OverlayCommitSource
Source§fn fetch(
&self,
txid: Txid,
cancelled: &AtomicBool,
) -> Result<Option<Vec<u8>>, Error>
fn fetch( &self, txid: Txid, cancelled: &AtomicBool, ) -> Result<Option<Vec<u8>>, Error>
Busy, local or remote, is no answer. Local Busy from request() also covers deadline expiry, a dial denied by our connection limits and a stopped network, so these are silent (Ok(None), nothing in status); FETCH_DEADLINE bounds the whole round. A configured peer, which may need a cold dial, gets a full call bound of what is left; the live tail splits the rest evenly, so stalling live peers cannot eat a later one’s turn. Zero answers plus any other peer or transport error is an error; otherwise absence. First valid wins.
fn chain(&self) -> Chain
Auto Trait Implementations§
impl Freeze for OverlayCommitSource
impl RefUnwindSafe for OverlayCommitSource
impl Send for OverlayCommitSource
impl Sync for OverlayCommitSource
impl Unpin for OverlayCommitSource
impl UnsafeUnpin for OverlayCommitSource
impl UnwindSafe for OverlayCommitSource
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
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