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

Method nodes_by_subnet

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

List all the nodes in a subnet.

(&self, subnet_name: &SubnetName)

Source from the content-addressed store, hash-verified

170
171 /// List all the nodes in a subnet.
172 pub fn nodes_by_subnet(&self, subnet_name: &SubnetName) -> Vec<&M::Node> {
173 self.nodes
174 .iter()
175 .filter(|(node_name, _)| subnet_name.contains(node_name))
176 .map(|(_, n)| n)
177 .collect()
178 }
179
180 /// Iterate all the nodes in the testnet.
181 pub fn nodes(&self) -> impl Iterator<Item = (&NodeName, &M::Node)> {

Callers 1

submit_configMethod · 0.80

Calls 2

collectMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected