Function delegation::pallet::dispatchables::revoke_delegation
source · pub fn revoke_delegation<T: Config>(
delegation_id: DelegationNodeIdOf<T>,
max_parent_checks: u32,
max_revocations: u32
)
Expand description
Revoke a delegation node (potentially a root node) and all its children.
Does not refund the delegation back to the deposit owner as the
node is still stored on chain. Requires to additionally call
remove_delegation
to unreserve the deposit.
Revoking a delegation node results in the trust hierarchy starting from the given node being revoked. Nevertheless, revocation starts from the leave nodes upwards, so if the operation ends prematurely because it runs out of gas, the delegation state would be consistent as no child would “survive” its parent. As a consequence, if the given node is revoked, the trust hierarchy with the node as root is to be considered revoked.
The dispatch origin must be split into
- a submitter of type
AccountId
who is responsible for paying the transaction fee and - a DID subject of type
DelegationEntityId
who creates, owns and can revoke the delegation.
Emits C * DelegationRevoked
.
Weight: O(C) where C is the number of children of the delegation
node which is bounded by max_children
.
- Reads: [Origin Account], Roots, C * Delegations, C * Children.
- Writes: Roots, C * Delegations
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::revoke_delegation
.