pub fn spawn_parachain_consensus_tasks<P, R, Block, B, S>(
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>>>,
spawn_handle: S,
)Expand description
Spawns the essential finalization tasks for parachain consensus.
This function creates and spawns two critical background tasks:
- A finalized head stream worker that monitors relay chain finality and extracts included headers
- The main parachain consensus task that handles finalization and best block updates