Skip to content

Commit ef564ed

Browse files
committed
Merge remote-tracking branch 'origin/devnet-ready' into fix/safe-math
2 parents 8b3d120 + e0c8250 commit ef564ed

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

pallets/subtensor/src/macros/dispatches.rs

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -457,18 +457,18 @@ mod dispatches {
457457
/// * `TooManyUnrevealedCommits`:
458458
/// - Attempting to commit when the user has more than the allowed limit of unrevealed commits.
459459
///
460-
#[pallet::call_index(99)]
461-
#[pallet::weight((Weight::from_parts(77_750_000, 0)
462-
.saturating_add(T::DbWeight::get().reads(9_u64))
463-
.saturating_add(T::DbWeight::get().writes(2)), DispatchClass::Normal, Pays::No))]
464-
pub fn commit_crv3_weights(
465-
origin: T::RuntimeOrigin,
466-
netuid: NetUid,
467-
commit: BoundedVec<u8, ConstU32<MAX_CRV3_COMMIT_SIZE_BYTES>>,
468-
reveal_round: u64,
469-
) -> DispatchResult {
470-
Self::do_commit_timelocked_weights(origin, netuid, commit, reveal_round, 4)
471-
}
460+
// #[pallet::call_index(99)]
461+
// #[pallet::weight((Weight::from_parts(77_750_000, 0)
462+
// .saturating_add(T::DbWeight::get().reads(9_u64))
463+
// .saturating_add(T::DbWeight::get().writes(2)), DispatchClass::Normal, Pays::No))]
464+
// pub fn commit_crv3_weights(
465+
// origin: T::RuntimeOrigin,
466+
// netuid: NetUid,
467+
// commit: BoundedVec<u8, ConstU32<MAX_CRV3_COMMIT_SIZE_BYTES>>,
468+
// reveal_round: u64,
469+
// ) -> DispatchResult {
470+
// Self::do_commit_timelocked_weights(origin, netuid, commit, reveal_round, 4)
471+
// }
472472

473473
/// ---- Used to commit encrypted commit-reveal v3 weight values to later be revealed for mechanisms.
474474
///
@@ -2358,5 +2358,16 @@ mod dispatches {
23582358
commit_reveal_version,
23592359
)
23602360
}
2361+
2362+
/// Remove a subnetwork
2363+
/// The caller must be root
2364+
#[pallet::call_index(120)]
2365+
#[pallet::weight((Weight::from_parts(119_000_000, 0)
2366+
.saturating_add(T::DbWeight::get().reads(6))
2367+
.saturating_add(T::DbWeight::get().writes(31)), DispatchClass::Operational, Pays::No))]
2368+
pub fn root_dissolve_network(origin: OriginFor<T>, netuid: NetUid) -> DispatchResult {
2369+
ensure_root(origin)?;
2370+
Self::do_dissolve_network(netuid)
2371+
}
23612372
}
23622373
}

0 commit comments

Comments
 (0)