Function delegation::pallet::dispatchables::reclaim_deposit
source · pub fn reclaim_deposit<T: Config>(
delegation_id: DelegationNodeIdOf<T>,
max_removals: u32
)
Expand description
Reclaim the deposit for a delegation node (potentially a root node), removing the node and all its children.
Returns the delegation deposit to the deposit owner for each removed DelegationNode by unreserving it.
Removing a delegation node results in the trust hierarchy starting from the given node being removed. Nevertheless, removal 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 removed, the trust hierarchy with the node as root is to be considered removed.
The dispatch origin must be signed by the delegation deposit owner.
DepositReclaimed
.
Weight: O(C) where C is the number of children of the delegation
node which is bounded by max_removals
.
- Reads: [Origin Account], Roots, C * Delegations, C * Children.
- Writes: Roots, 2 * C * Delegations
Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::reclaim_deposit
.