Skip to main content

spawn_block_export_queue

Function spawn_block_export_queue 

Source
pub fn spawn_block_export_queue<S, P>(
    storage: S,
    node_provider: Arc<P>,
    config: BlockExportConfig,
    own_public_key: Option<ValidatorPublicKey>,
) -> BlockExportHandle
where S: Storage + Clone + Send + Sync + 'static, P: ValidatorNodeProvider + Send + Sync + 'static, P::Node: Send + Sync,
Expand description

Spawns the process-wide export queue task and returns the handle chain workers push to.

The task runs until every clone of the returned handle is dropped, and reads only from storage — never through a chain worker, whose TTL a touch would reset.