MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / start_eth_api

Function start_eth_api

ipc/cli/src/services/node_manager.rs:396–417  ·  view source on GitHub ↗

Start the ETH API service ETH API provides Ethereum JSON-RPC compatibility over CometBFT.

(
    settings: &Settings,
    cancel_token: &CancellationToken,
)

Source from the content-addressed store, hash-verified

394///
395/// ETH API provides Ethereum JSON-RPC compatibility over CometBFT.
396async fn start_eth_api(
397 settings: &Settings,
398 cancel_token: &CancellationToken,
399) -> Result<JoinHandle<Result<()>>> {
400 info!(target: "service.node_manager", "Starting ETH API service");
401
402 let settings = settings.clone();
403 let token = cancel_token.clone();
404 let config = RestartConfig::default();
405
406 let handle = tokio::spawn(async move {
407 run_service_with_restart(
408 "ETH API",
409 move || EthApiService::new(settings.clone(), Duration::from_secs(5)),
410 token,
411 config,
412 )
413 .await
414 });
415
416 Ok(handle)
417}
418
419/// Wait for all services to complete or shutdown
420///

Callers 1

start_all_servicesMethod · 0.85

Calls 1

run_service_with_restartFunction · 0.85

Tested by

no test coverage detected