File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -346,5 +346,16 @@ mod benchmarks {
346346 _ ( RawOrigin :: Root , 5u16 /*version*/ ) /*sudo_set_commit_reveal_version()*/ ;
347347 }
348348
349+ #[ benchmark]
350+ fn sudo_trim_to_max_allowed_uids ( ) {
351+ pallet_subtensor:: Pallet :: < T > :: init_new_network (
352+ 1u16 . into ( ) , /*netuid*/
353+ 1u16 , /*sudo_tempo*/
354+ ) ;
355+
356+ #[ extrinsic_call]
357+ _ ( RawOrigin :: Root , 1u16 . into ( ) /*netuid*/ , 4097u16 /*max_allowed_uids*/ ) /*sudo_trim_to_max_allowed_uids()*/ ;
358+ }
359+
349360 //impl_benchmark_test_suite!(AdminUtils, crate::mock::new_test_ext(), crate::mock::Test);
350361}
Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ impl<T: Config> Pallet<T> {
194194 // Remove tao dividends for the hotkey
195195 TaoDividendsPerSubnet :: < T > :: remove ( netuid, & hotkey) ;
196196 }
197+ #[ allow( unknown_lints) ]
197198 Keys :: < T > :: remove ( netuid, uid) ;
198199 // Remove block at registration for the uid
199200 BlockAtRegistration :: < T > :: remove ( netuid, uid) ;
You can’t perform that action at this time.
0 commit comments