Skip to main content

GossipedBlockDownloads

Type Alias GossipedBlockDownloads 

Source
type GossipedBlockDownloads = Downloads<Timeout<Buffer<BoxService<Request, Response, BoxError>, Request>>, Timeout<Buffer<BoxService<Request, Hash, RouterError>, Request>>, Buffer<BoxService<Request, Response, BoxError>, Request>>;

Aliased Type§

struct GossipedBlockDownloads {
    full_verify_concurrency_limit: usize,
    network: Timeout<Buffer<BoxService<Request, Response, Box<dyn Error + Sync + Send>>, Request>>,
    verifier: Timeout<Buffer<BoxService<Request, Hash, RouterError>, Request>>,
    state: Buffer<BoxService<Request, Response, Box<dyn Error + Sync + Send>>, Request>,
    latest_chain_tip: LatestChainTip,
    pending: FuturesUnordered<JoinHandle<Result<Hash, (Box<dyn Error + Sync + Send>, Hash, Option<PeerSocketAddr>)>>>,
    cancel_handles: HashMap<Hash, Sender<()>>,
}

Fields§

§full_verify_concurrency_limit: usize

The configured full verification concurrency limit, after applying the minimum limit.

§network: Timeout<Buffer<BoxService<Request, Response, Box<dyn Error + Sync + Send>>, Request>>

A service that forwards requests to connected peers, and returns their responses.

§verifier: Timeout<Buffer<BoxService<Request, Hash, RouterError>, Request>>

A service that verifies downloaded blocks.

§state: Buffer<BoxService<Request, Response, Box<dyn Error + Sync + Send>>, Request>

A service that manages cached blockchain state.

§latest_chain_tip: LatestChainTip

Allows efficient access to the best tip of the blockchain.

§pending: FuturesUnordered<JoinHandle<Result<Hash, (Box<dyn Error + Sync + Send>, Hash, Option<PeerSocketAddr>)>>>

A list of pending block download and verify tasks.

§cancel_handles: HashMap<Hash, Sender<()>>

A list of channels that can be used to cancel pending block download and verify tasks.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 320 bytes