Skip to content

Commit aa72439

Browse files
committed
re-enable sudo_set_subnet_owner_hotkey
1 parent de04830 commit aa72439

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

pallets/admin-utils/src/lib.rs

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,31 +1667,27 @@ pub mod pallet {
16671667
Ok(())
16681668
}
16691669

1670-
// /// Change the SubnetOwnerHotkey for a given subnet.
1671-
// ///
1672-
// /// # Arguments
1673-
// /// * `origin` - The origin of the call, which must be the subnet owner.
1674-
// /// * `netuid` - The unique identifier for the subnet.
1675-
// /// * `hotkey` - The new hotkey for the subnet owner.
1676-
// ///
1677-
// /// # Errors
1678-
// /// * `BadOrigin` - If the caller is not the subnet owner or root account.
1679-
// ///
1680-
// /// # Weight
1681-
// /// Weight is handled by the `#[pallet::weight]` attribute.
1682-
// #[pallet::call_index(64)]
1683-
// #[pallet::weight((0, DispatchClass::Operational, Pays::No))]
1684-
// pub fn sudo_set_subnet_owner_hotkey(
1685-
// origin: OriginFor<T>,
1686-
// netuid: NetUid,
1687-
// hotkey: <T as frame_system::Config>::AccountId,
1688-
// ) -> DispatchResult {
1689-
// pallet_subtensor::Pallet::<T>::ensure_subnet_owner(origin.clone(), netuid)?;
1690-
// pallet_subtensor::Pallet::<T>::set_subnet_owner_hotkey(netuid, &hotkey);
1691-
1692-
// log::debug!("SubnetOwnerHotkeySet( netuid: {netuid:?}, hotkey: {hotkey:?} )");
1693-
// Ok(())
1694-
// }
1670+
/// Change the SubnetOwnerHotkey for a given subnet.
1671+
///
1672+
/// # Arguments
1673+
/// * `origin` - The origin of the call, which must be the subnet owner.
1674+
/// * `netuid` - The unique identifier for the subnet.
1675+
/// * `hotkey` - The new hotkey for the subnet owner.
1676+
///
1677+
/// # Errors
1678+
/// * `BadOrigin` - If the caller is not the subnet owner or root account.
1679+
///
1680+
/// # Weight
1681+
/// Weight is handled by the `#[pallet::weight]` attribute.
1682+
#[pallet::call_index(64)]
1683+
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
1684+
pub fn sudo_set_subnet_owner_hotkey(
1685+
origin: OriginFor<T>,
1686+
netuid: NetUid,
1687+
hotkey: <T as frame_system::Config>::AccountId,
1688+
) -> DispatchResult {
1689+
pallet_subtensor::Pallet::<T>::do_set_sn_owner_hotkey(origin, netuid, &hotkey)
1690+
}
16951691

16961692
///
16971693
///

0 commit comments

Comments
 (0)