Function zebra_rpc::sync::init_read_state_with_syncer

source ·
pub fn init_read_state_with_syncer(
    config: Config,
    network: &Network,
    rpc_address: SocketAddr,
) -> JoinHandle<Result<(ReadStateService, LatestChainTip, ChainTipChange, JoinHandle<()>), BoxError>> 
Expand description

Accepts a zebra-state configuration, a Network, and the SocketAddr of a Zebra node’s RPC server.

Initializes a ReadStateService and a TrustedChainSync to update the non-finalized best chain and the latest chain tip.

Returns a ReadStateService, LatestChainTip, ChainTipChange, and a [JoinHandle] for the sync task.