@@ -975,21 +975,6 @@ pub mod pallet {
975975 Ok ( ( ) )
976976 }
977977
978- /// The extrinsic sets the subnet limit for the network.
979- /// It is only callable by the root account.
980- /// The extrinsic will call the Subtensor pallet to set the subnet limit.
981- #[ pallet:: call_index( 37 ) ]
982- #[ pallet:: weight( (
983- Weight :: from_parts( 14_000_000 , 0 )
984- . saturating_add( <T as frame_system:: Config >:: DbWeight :: get( ) . writes( 1 ) ) ,
985- DispatchClass :: Operational ,
986- Pays :: No
987- ) ) ]
988- pub fn sudo_set_subnet_limit ( origin : OriginFor < T > , _max_subnets : u16 ) -> DispatchResult {
989- ensure_root ( origin) ?;
990- Ok ( ( ) )
991- }
992-
993978 /// The extrinsic sets the lock reduction interval for the network.
994979 /// It is only callable by the root account.
995980 /// The extrinsic will call the Subtensor pallet to set the lock reduction interval.
@@ -1094,26 +1079,6 @@ pub mod pallet {
10941079 Ok ( ( ) )
10951080 }
10961081
1097- // The extrinsic sets the target stake per interval.
1098- // It is only callable by the root account.
1099- // The extrinsic will call the Subtensor pallet to set target stake per interval.
1100- // #[pallet::call_index(47)]
1101- // #[pallet::weight((0, DispatchClass::Operational, Pays::No))]
1102- // pub fn sudo_set_target_stakes_per_interval(
1103- // origin: OriginFor<T>,
1104- // target_stakes_per_interval: u64,
1105- // ) -> DispatchResult {
1106- // ensure_root(origin)?;
1107- // pallet_subtensor::Pallet::<T>::set_target_stakes_per_interval(
1108- // target_stakes_per_interval,
1109- // );
1110- // log::debug!(
1111- // "TxTargetStakesPerIntervalSet( set_target_stakes_per_interval: {:?} ) ",
1112- // target_stakes_per_interval
1113- // ); (DEPRECATED)
1114- // Ok(())
1115- // } (DEPRECATED)
1116-
11171082 /// The extrinsic enabled/disables commit/reaveal for a given subnet.
11181083 /// It is only callable by the root account or subnet owner.
11191084 /// The extrinsic will call the Subtensor pallet to set the value.
@@ -1175,62 +1140,6 @@ pub mod pallet {
11751140 )
11761141 }
11771142
1178- // DEPRECATED
1179- // #[pallet::call_index(52)]
1180- // #[pallet::weight((0, DispatchClass::Operational, Pays::No))]
1181- // pub fn sudo_set_hotkey_emission_tempo(
1182- // origin: OriginFor<T>,
1183- // emission_tempo: u64,
1184- // ) -> DispatchResult {
1185- // ensure_root(origin)?;
1186- // pallet_subtensor::Pallet::<T>::set_hotkey_emission_tempo(emission_tempo);
1187- // log::debug!(
1188- // "HotkeyEmissionTempoSet( emission_tempo: {:?} )",
1189- // emission_tempo
1190- // );
1191- // Ok(())
1192- // }
1193-
1194- /// Sets the maximum stake allowed for a specific network.
1195- ///
1196- /// This function allows the root account to set the maximum stake for a given network.
1197- /// It updates the network's maximum stake value and logs the change.
1198- ///
1199- /// # Arguments
1200- ///
1201- /// * `origin` - The origin of the call, which must be the root account.
1202- /// * `netuid` - The unique identifier of the network.
1203- /// * `max_stake` - The new maximum stake value to set.
1204- ///
1205- /// # Returns
1206- ///
1207- /// Returns `Ok(())` if the operation is successful, or an error if it fails.
1208- ///
1209- /// # Example
1210- ///
1211- ///
1212- /// # Notes
1213- ///
1214- /// - This function can only be called by the root account.
1215- /// - The `netuid` should correspond to an existing network.
1216- ///
1217- /// # TODO
1218- ///
1219- // - Consider adding a check to ensure the `netuid` corresponds to an existing network.
1220- // - Implement a mechanism to gradually adjust the max stake to prevent sudden changes.
1221- // #[pallet::weight(<T as Config>::WeightInfo::sudo_set_network_max_stake())]
1222- #[ pallet:: call_index( 53 ) ]
1223- #[ pallet:: weight( ( 0 , DispatchClass :: Operational , Pays :: No ) ) ]
1224- pub fn sudo_set_network_max_stake (
1225- origin : OriginFor < T > ,
1226- _netuid : NetUid ,
1227- _max_stake : u64 ,
1228- ) -> DispatchResult {
1229- // Ensure the call is made by the root account
1230- ensure_root ( origin) ?;
1231- Ok ( ( ) )
1232- }
1233-
12341143 /// Sets the duration of the coldkey swap schedule.
12351144 ///
12361145 /// This extrinsic allows the root account to set the duration for the coldkey swap schedule.
0 commit comments