Function sc_consensus_babe::import_queue
source · pub fn import_queue<Block: BlockT, Client, SelectChain, BI, CIDP, Spawn>(
_: ImportQueueParams<'_, Block, BI, Client, CIDP, SelectChain, Spawn>,
) -> Result<(DefaultImportQueue<Block>, BabeWorkerHandle<Block>)>where
BI: BlockImport<Block, Error = Error> + Send + Sync + 'static,
Client: ProvideRuntimeApi<Block> + HeaderBackend<Block> + HeaderMetadata<Block, Error = Error> + AuxStore + Send + Sync + 'static,
Client::Api: BlockBuilderApi<Block> + BabeApi<Block> + ApiExt<Block>,
SelectChain: SelectChain<Block> + 'static,
CIDP: CreateInherentDataProviders<Block, ()> + Send + Sync + 'static,
CIDP::InherentDataProviders: InherentDataProviderExt + Send + Sync,
Spawn: SpawnEssentialNamed,
Expand description
Start an import queue for the BABE consensus algorithm.
This method returns the import queue, some data that needs to be passed to the block authoring
logic (BabeLink
), and a future that must be run to
completion and is responsible for listening to finality notifications and
pruning the epoch changes tree.
The block import object provided must be the BabeBlockImport
or a wrapper
of it, otherwise crucial import logic will be omitted.