MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / start

Method start

fendermint/testing/materializer/src/docker/node.rs:467–495  ·  view source on GitHub ↗
(&self, seed_nodes: &[&Self])

Source from the content-addressed store, hash-verified

465 }
466
467 pub async fn start(&self, seed_nodes: &[&Self]) -> anyhow::Result<()> {
468 let cometbft_seeds = collect_seeds(seed_nodes, |n| {
469 let host = &n.cometbft.hostname();
470 let id = n.cometbft_node_id()?;
471 Ok(format!("{id}@{host}:{COMETBFT_P2P_PORT}"))
472 })?;
473
474 let resolver_seeds = collect_seeds(seed_nodes, |n| {
475 let host = &n.fendermint.hostname();
476 let id = n.fendermint_peer_id()?;
477 Ok(format!("/dns/{host}/tcp/{RESOLVER_P2P_PORT}/p2p/{id}"))
478 })?;
479
480 let env = env_vars! [
481 "CMT_P2P_SEEDS" => cometbft_seeds,
482 "FM_RESOLVER__DISCOVERY__STATIC_ADDRESSES" => resolver_seeds,
483 ];
484
485 export_env(self.path.join(DYNAMIC_ENV), &env)?;
486
487 // Start all three containers.
488 self.fendermint.start().await?;
489 self.cometbft.start().await?;
490 if let Some(ref ethapi) = self.ethapi {
491 ethapi.start().await?;
492 }
493
494 Ok(())
495 }
496
497 /// Allow time for things to consolidate and APIs to start.
498 pub async fn wait_for_started(&self, timeout: Duration) -> anyhow::Result<bool> {

Callers 4

runFunction · 0.45
start_nodeMethod · 0.45
create_relayerMethod · 0.45
handleMethod · 0.45

Calls 6

collect_seedsFunction · 0.85
export_envFunction · 0.85
hostnameMethod · 0.80
cometbft_node_idMethod · 0.80
fendermint_peer_idMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected