Skip to content

Commit

Permalink
swap identity during hotkey swap
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnReedV committed Jul 22, 2024
1 parent 60fab8c commit b7ebf96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pallets/subtensor/src/swap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ impl<T: Config> Pallet<T> {

Self::swap_total_hotkey_coldkey_stakes_this_interval(old_hotkey, new_hotkey, &mut weight);

// Swap identity if the old hotkey has one.
if T::RegistryPallet::get_identity_of_delegate(old_hotkey).is_some() {
T::RegistryPallet::swap_delegate_identity_hotkey(old_hotkey, new_hotkey)?;
}

Self::set_last_tx_block(&coldkey, block);
weight.saturating_accrue(T::DbWeight::get().writes(1));

Expand Down

0 comments on commit b7ebf96

Please sign in to comment.