Check if this is the root subnet, ie. it ends with `root` and it parent is a `testnet`
(&self)
| 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() { |