> For the complete documentation index, see [llms.txt](https://docs.hypertensor.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hypertensor.org/network/subnet-node/reactivate.md).

# Reactivate

To reactivate from [deactivation](#deactivating), the subnet node must call `reactivate_subnet_node` up to the `MaxDeactivationEpochs` from the deactivation epoch plus one. Once reactivated, the subnet node will begin to be involved in consensus on the following epoch as a Validator classified node.

If a deactivated node doesn't reactivate by the `MaxDeactivationEpochs` from the epoch they deactivated, it won't be able to reactivate and must remove itself from the blockchain and reregister.

```rust
pub fn reactivate_subnet_node(
    origin: OriginFor<T>, 
    subnet_id: u32, 
    subnet_node_id: u32,
)
```

#### Inserted & Updated Storage

```rust
let mut subnet_node = DeactivatedSubnetNodesData::<T>::take(subnet_id, subnet_node_id);

...

subnet_node.classification.class = SubnetNodeClass::Validator;
subnet_node.classification.start_epoch = epoch + 1;

...

// --- Enter node into the Queue class
SubnetNodesData::<T>::insert(subnet_id, subnet_node.id, subnet_node);

// Increase total subnet nodes
TotalSubnetNodes::<T>::mutate(subnet_id, |n: &mut u32| *n += 1);
```

#### Note

There are cleanup functions for registered and deactivated nodes that fail to activate or reactivate that anyone can call.
