Skip to main content

spawn_init_read_only

Function spawn_init_read_only 

Source
pub fn spawn_init_read_only(
    config: Config,
    network: &Network,
) -> JoinHandle<Result<(ReadStateService, ZebraDb, Sender<NonFinalizedState>), StateInitError>>
Expand description

Calls init_read_only with the provided Config and Network from a blocking task.

Returns a tokio::task::JoinHandle whose output is a Result: awaiting it yields a JoinError if the blocking task panicked or was cancelled, and otherwise an Err(StateInitError) if the read-only state could not be opened (for example, a missing read-only database).