Skip to content

Commit

Permalink
add clean up part
Browse files Browse the repository at this point in the history
  • Loading branch information
open-junius committed Jan 9, 2025
1 parent eccc3db commit a28d6b7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pallets/subtensor/src/subnets/uids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ impl<T: Config> Pallet<T> {
Self::add_balance_to_coldkey_account(&coldkey, tao_unstaked);
}
}

// 6 check old hotkey stake below stake threshold
if Self::get_total_stake_for_hotkey(&old_hotkey) < StakeThreshold::<T>::get() {
Self::get_all_subnet_netuids().iter().for_each(|netuid| {
PendingChildKeys::<T>::remove(netuid, &old_hotkey);
})
}
}

/// Appends the uid to the network.
Expand Down

0 comments on commit a28d6b7

Please sign in to comment.