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

Method start_node

fendermint/testing/materializer/src/testnet.rs:351–374  ·  view source on GitHub ↗

Start a node. Fails if the node hasn't been created yet.

(
        &mut self,
        m: &mut R,
        subnet_name: &SubnetName,
        node_id: &NodeId,
        node: &Node,
    )

Source from the content-addressed store, hash-verified

349 ///
350 /// Fails if the node hasn't been created yet.
351 async fn start_node(
352 &mut self,
353 m: &mut R,
354 subnet_name: &SubnetName,
355 node_id: &NodeId,
356 node: &Node,
357 ) -> anyhow::Result<()> {
358 let node_name = subnet_name.node(node_id);
359
360 let seeds = node
361 .seed_nodes
362 .iter()
363 .map(|s| self.node(&subnet_name.node(s)))
364 .collect::<Result<Vec<_>, _>>()
365 .with_context(|| format!("failed to collect seeds for {node_name:?}"))?;
366
367 let node = self.node(&node_name)?;
368
369 m.start_node(node, &seeds)
370 .await
371 .with_context(|| format!("failed to start {node_name:?}"))?;
372
373 Ok(())
374 }
375
376 async fn create_and_start_rootnet(
377 &mut self,

Callers 1

Calls 2

with_contextMethod · 0.80
nodeMethod · 0.45

Tested by

no test coverage detected