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

Method join_subnet

fendermint/testing/materializer/src/validation.rs:316–334  ·  view source on GitHub ↗
(
        &'s mut self,
        _parent_submit_config: &SubmitConfig<'a, ValidationMaterials>,
        account: &'a VAccount,
        subnet: &'a VSubnet,
        collateral: Collateral,
        balan

Source from the content-addressed store, hash-verified

314 }
315
316 async fn join_subnet<'s, 'a>(
317 &'s mut self,
318 _parent_submit_config: &SubmitConfig<'a, ValidationMaterials>,
319 account: &'a VAccount,
320 subnet: &'a VSubnet,
321 collateral: Collateral,
322 balance: Balance,
323 reference: Option<ResourceHash>,
324 ) -> anyhow::Result<()>
325 where
326 's: 'a,
327 {
328 // Debit parent balance, but do not make the funds available in the child
329 self.fund_from_parent(subnet, account, collateral.0, false)?;
330 // Debit parent balance; Credit child balance
331 self.fund_from_parent(subnet, account, balance.0, true)?;
332 self.ensure_unique(&subnet.parent().unwrap(), reference)?;
333 Ok(())
334 }
335
336 async fn create_subnet_genesis<'s, 'a>(
337 &'s mut self,

Callers

nothing calls this directly

Calls 3

fund_from_parentMethod · 0.80
ensure_uniqueMethod · 0.80
parentMethod · 0.45

Tested by

no test coverage detected