(
&'s mut self,
parent_submit_config: &SubmitConfig<'a, ValidationMaterials>,
subnet_name: &SubnetName,
subnet_config: &SubnetConfig<'a, ValidationMaterials>,
)
| 283 | } |
| 284 | |
| 285 | async fn create_subnet<'s, 'a>( |
| 286 | &'s mut self, |
| 287 | parent_submit_config: &SubmitConfig<'a, ValidationMaterials>, |
| 288 | subnet_name: &SubnetName, |
| 289 | subnet_config: &SubnetConfig<'a, ValidationMaterials>, |
| 290 | ) -> anyhow::Result<VSubnet> |
| 291 | where |
| 292 | 's: 'a, |
| 293 | { |
| 294 | self.ensure_contains(subnet_name)?; |
| 295 | // Check that the submitter has balance on the parent subnet to create the child. |
| 296 | let parent = parent_submit_config.subnet; |
| 297 | self.ensure_balance(&parent.name, subnet_config.creator)?; |
| 298 | // Insert child subnet balances entry. |
| 299 | self.balances |
| 300 | .insert(subnet_name.clone(), Default::default()); |
| 301 | |
| 302 | Ok(ValidatedSubnet { |
| 303 | name: subnet_name.clone(), |
| 304 | owner: subnet_config.creator.0.id(), |
| 305 | }) |
| 306 | } |
| 307 | |
| 308 | async fn approve_subnet<'s, 'a>( |
| 309 | &'s mut self, |
nothing calls this directly
no test coverage detected