Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pallets/subtensor/src/migrations/migrate_rao.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ pub fn migrate_rao<T: Config>() -> Weight {
SubnetOwnerHotkey::<T>::insert(netuid, owner_coldkey.clone());
// Associate the coldkey to coldkey.
Pallet::<T>::create_account_if_non_existent(&owner_coldkey, &owner_coldkey);
// Register the owner_coldkey as neuron to the network.
let _neuron_uid: u16 = Pallet::<T>::register_neuron(*netuid, &owner_coldkey);

// Only register the owner coldkey if it's not already a hotkey on the subnet.
if !Uids::<T>::contains_key(*netuid, &owner_coldkey) {
// Register the owner_coldkey as neuron to the network.
let _neuron_uid: u16 = Pallet::<T>::register_neuron(*netuid, &owner_coldkey);
}
// Register the neuron immediately.
if !Identities::<T>::contains_key(owner_coldkey.clone()) {
// Set the identitiy for the Owner coldkey if non existent.
Expand Down
Loading