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

Function start_cometbft

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

Start the CometBFT consensus service CometBFT connects to Fendermint's ABCI server for consensus.

(
    home: &Path,
    cancel_token: &CancellationToken,
)

Source from the content-addressed store, hash-verified

262///
263/// CometBFT connects to Fendermint's ABCI server for consensus.
264async fn start_cometbft(
265 home: &Path,
266 cancel_token: &CancellationToken,
267) -> Result<JoinHandle<Result<()>>> {
268 info!(target: "service.node_manager", "Starting CometBFT consensus service");
269
270 let cometbft_service = CometBftService::new(home.join("cometbft"));
271 let token = cancel_token.clone();
272
273 let handle = tokio::spawn(async move {
274 cometbft_service
275 .run(token)
276 .await
277 .context("CometBFT service encountered an error")
278 });
279
280 info!(target: "service.node_manager", "CometBFT service started");
281 Ok(handle)
282}
283
284/// Wait for CometBFT RPC to become ready
285///

Callers 1

start_all_servicesMethod · 0.85

Calls 3

contextMethod · 0.80
joinMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected