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

Method is_root

fendermint/testing/materializer/src/lib.rs:289–297  ·  view source on GitHub ↗

Check if this is the root subnet, ie. it ends with `root` and it parent is a `testnet`

(&self)

Source from the content-addressed store, hash-verified

287
288 /// Check if this is the root subnet, ie. it ends with `root` and it parent is a `testnet`
289 pub fn is_root(&self) -> bool {
290 self.path().ends_with("root")
291 && self
292 .path()
293 .parent()
294 .and_then(|p| p.parent())
295 .filter(|p| p.ends_with("testnets"))
296 .is_some()
297 }
298
299 pub fn parent(&self) -> Option<SubnetName> {
300 if self.is_root() {

Callers 5

topdown_enabledMethod · 0.45
parentMethod · 0.45
submit_configMethod · 0.45
create_nodeMethod · 0.45

Calls 2

pathMethod · 0.45
parentMethod · 0.45

Tested by 3

submit_configMethod · 0.36
create_nodeMethod · 0.36