Trait sc_service::ImportQueue[][src]

pub trait ImportQueue<B>: Send where
    B: Block
{ fn import_blocks(
        &mut self,
        origin: BlockOrigin,
        blocks: Vec<IncomingBlock<B>, Global>
fn import_justifications(
        &mut self,
        who: PeerId,
        hash: <B as Block>::Hash,
        number: <<B as Block>::Header as Header>::Number,
        justifications: Justifications
fn poll_actions(&mut self, cx: &mut Context<'_>, link: &mut dyn Link<B>); }
Expand description

Blocks import queue API.

The import_* methods can be called in order to send elements for the import queue to verify. Afterwards, call poll_actions to determine how to respond to these elements.

Required methods

Import bunch of blocks.

Import block justifications.

Polls for actions to perform on the network.

This method should behave in a way similar to Future::poll. It can register the current task and notify later when more actions are ready to be polled. To continue the comparison, it is as if this method always returned Poll::Pending.

Implementations on Foreign Types