pub async fn run_parachain_consensus<P, R, Block, B>(
    para_id: Id,
    parachain: Arc<P>,
    relay_chain: R,
    announce_block: Arc<dyn Fn(Block::Hash, Option<Vec<u8>>) + Send + Sync>,
    recovery_chan_tx: Option<Sender<RecoveryRequest<Block>>>
)
where Block: BlockT, P: Finalizer<Block, B> + UsageProvider<Block> + Send + Sync + BlockBackend<Block> + BlockchainEvents<Block>, for<'a> &'a P: BlockImport<Block>, R: RelayChainInterface + Clone, B: Backend<Block>,
Expand description

Run the parachain consensus.

This will follow the given relay_chain to act as consensus for the parachain that corresponds to the given para_id. It will set the new best block of the parachain as it gets aware of it. The same happens for the finalized block.

§Note

This will access the backend of the parachain and thus, this future should be spawned as blocking task.