MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / spawn

Method spawn

nodedb-cluster/tests/common/test_node.rs:117–123  ·  view source on GitHub ↗

Fresh transport + fresh temp data dir. Convenience for tests that don't care about address or lifetime control.

(
        node_id: u64,
        seed_nodes: Vec<SocketAddr>,
    )

Source from the content-addressed store, hash-verified

115 /// Fresh transport + fresh temp data dir. Convenience for tests
116 /// that don't care about address or lifetime control.
117 pub async fn spawn(
118 node_id: u64,
119 seed_nodes: Vec<SocketAddr>,
120 ) -> Result<Self, Box<dyn std::error::Error + Send + Sync>> {
121 let transport = Arc::new(test_transport(node_id)?);
122 Self::spawn_with_transport(node_id, transport, seed_nodes).await
123 }
124
125 /// Use a pre-bound transport so the caller knows the listen
126 /// address before start_cluster runs. Fresh temp data dir.

Calls 1

test_transportFunction · 0.70

Tested by

no test coverage detected