Deactivate
Nodes can temporarily deactivate themselves up to the MaxDeactivationEpochs
. Only nodes that are classified as Validators can deactivate; otherwise, the node must remove itself. Deactivations must last at least one epoch.
pub fn deactivate_subnet_node(
origin: OriginFor<T>,
subnet_id: u32,
subnet_node_id: u32,
)
Inserted & Updated Storage
...
SubnetNodesData::<T>::take(subnet_id, subnet_node_id)
...
DeactivatedSubnetNodesData::<T>::insert(subnet_id, subnet_node.id, subnet_node);
TotalSubnetNodes::<T>::mutate(subnet_id, |n: &mut u32| *n -= 1);
Last updated