[][src]Trait substrate_consensus_common::import_queue::ImportQueue

pub trait ImportQueue<B: BlockT>: Send {
    fn import_blocks(
        &mut self,
        origin: BlockOrigin,
        blocks: Vec<IncomingBlock<B>>
    );
fn import_justification(
        &mut self,
        who: Origin,
        hash: B::Hash,
        number: NumberFor<B>,
        justification: Justification
    );
fn import_finality_proof(
        &mut self,
        who: Origin,
        hash: B::Hash,
        number: NumberFor<B>,
        finality_proof: Vec<u8>
    );
fn poll_actions(&mut self, cx: &mut Context, link: &mut dyn Link<B>); }

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

fn import_blocks(&mut self, origin: BlockOrigin, blocks: Vec<IncomingBlock<B>>)

Import bunch of blocks.

fn import_justification(
    &mut self,
    who: Origin,
    hash: B::Hash,
    number: NumberFor<B>,
    justification: Justification
)

Import a block justification.

fn import_finality_proof(
    &mut self,
    who: Origin,
    hash: B::Hash,
    number: NumberFor<B>,
    finality_proof: Vec<u8>
)

Import block finality proof.

fn poll_actions(&mut self, cx: &mut Context, link: &mut dyn Link<B>)

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.

Loading content...

Implementors

impl<B: BlockT> ImportQueue<B> for BasicQueue<B>[src]

Loading content...