[][src]Struct zebrad::commands::start::sync::Syncer

pub struct Syncer<ZN, ZS, ZV> where
    ZN: Service<Request>, 
{ pub peer_set: ZN, pub state: ZS, pub verifier: ZV, pub retry_peer_set: Retry<RetryLimit, ZN>, pub prospective_tips: HashSet<BlockHeaderHash>, pub block_requests: FuturesUnordered<ZN::Future>, pub fanout: u32, }

Fields

peer_set: ZNstate: ZSverifier: ZVretry_peer_set: Retry<RetryLimit, ZN>prospective_tips: HashSet<BlockHeaderHash>block_requests: FuturesUnordered<ZN::Future>fanout: u32

Implementations

impl<ZN, ZS, ZC> Syncer<ZN, ZS, ZC> where
    ZN: Service<Request> + Clone
[src]

pub fn new(peer_set: ZN, state: ZS, verifier: ZC) -> Self[src]

impl<ZN, ZS, ZV> Syncer<ZN, ZS, ZV> where
    ZN: Service<Request, Response = Response, Error = Box<dyn Error + Send + Sync + 'static>> + Send + Clone + 'static,
    ZN::Future: Send,
    ZS: Service<Request, Response = Response, Error = Box<dyn Error + Send + Sync + 'static>> + Send + Clone + 'static,
    ZS::Future: Send,
    ZV: Service<Arc<Block>, Response = BlockHeaderHash, Error = Box<dyn Error + Send + Sync + 'static>> + Send + Clone + 'static,
    ZV::Future: Send
[src]

pub async fn run<'_>(&'_ mut self) -> Result<(), Report>[src]

async fn obtain_tips<'_>(&'_ mut self) -> Result<(), Report>[src]

Given a block_locator list fan out request for subsequent hashes to multiple peers

async fn extend_tips<'_>(&'_ mut self) -> Result<(), Report>[src]

async fn request_blocks<'_>(
    &'_ mut self,
    hashes: Vec<BlockHeaderHash>
) -> Result<(), Report>
[src]

Queue downloads for each block that isn't currently known to our node

Auto Trait Implementations

impl<ZN, ZS, ZV> !RefUnwindSafe for Syncer<ZN, ZS, ZV>

impl<ZN, ZS, ZV> Send for Syncer<ZN, ZS, ZV> where
    ZN: Send,
    ZS: Send,
    ZV: Send,
    <ZN as Service<Request>>::Future: Send

impl<ZN, ZS, ZV> Sync for Syncer<ZN, ZS, ZV> where
    ZN: Sync,
    ZS: Sync,
    ZV: Sync,
    <ZN as Service<Request>>::Future: Sync

impl<ZN, ZS, ZV> Unpin for Syncer<ZN, ZS, ZV> where
    ZN: Unpin,
    ZS: Unpin,
    ZV: Unpin

impl<ZN, ZS, ZV> !UnwindSafe for Syncer<ZN, ZS, ZV>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]