@@ -966,7 +966,7 @@ mod dispatches {
966
966
) -> DispatchResultWithPostInfo {
967
967
// Ensure it's called with root privileges (scheduler has root privileges)
968
968
ensure_root ( origin) ?;
969
- log:: info !( "swap_coldkey: {:?} -> {:?}" , old_coldkey, new_coldkey) ;
969
+ log:: debug !( "swap_coldkey: {:?} -> {:?}" , old_coldkey, new_coldkey) ;
970
970
971
971
Self :: do_swap_coldkey ( & old_coldkey, & new_coldkey, swap_cost)
972
972
}
@@ -1389,40 +1389,42 @@ mod dispatches {
1389
1389
. saturating_add( T :: DbWeight :: get( ) . reads( 6 ) )
1390
1390
. saturating_add( T :: DbWeight :: get( ) . writes( 31 ) ) , DispatchClass :: Operational , Pays :: Yes ) ) ]
1391
1391
pub fn schedule_dissolve_network (
1392
- origin : OriginFor < T > ,
1393
- netuid : u16 ,
1392
+ _origin : OriginFor < T > ,
1393
+ _netuid : u16 ,
1394
1394
) -> DispatchResultWithPostInfo {
1395
- let who = ensure_signed ( origin) ?;
1396
-
1397
- let current_block: BlockNumberFor < T > = <frame_system:: Pallet < T > >:: block_number ( ) ;
1398
- let duration: BlockNumberFor < T > = DissolveNetworkScheduleDuration :: < T > :: get ( ) ;
1399
- let when: BlockNumberFor < T > = current_block. saturating_add ( duration) ;
1400
-
1401
- let call = Call :: < T > :: dissolve_network {
1402
- coldkey : who. clone ( ) ,
1403
- netuid,
1404
- } ;
1405
-
1406
- let bound_call = T :: Preimages :: bound ( LocalCallOf :: < T > :: from ( call. clone ( ) ) )
1407
- . map_err ( |_| Error :: < T > :: FailedToSchedule ) ?;
1408
-
1409
- T :: Scheduler :: schedule (
1410
- DispatchTime :: At ( when) ,
1411
- None ,
1412
- 63 ,
1413
- frame_system:: RawOrigin :: Root . into ( ) ,
1414
- bound_call,
1415
- )
1416
- . map_err ( |_| Error :: < T > :: FailedToSchedule ) ?;
1417
-
1418
- // Emit the SwapScheduled event
1419
- Self :: deposit_event ( Event :: DissolveNetworkScheduled {
1420
- account : who. clone ( ) ,
1421
- netuid,
1422
- execution_block : when,
1423
- } ) ;
1424
-
1425
- Ok ( ( ) . into ( ) )
1395
+ Err ( Error :: < T > :: CallDisabled . into ( ) )
1396
+
1397
+ // let who = ensure_signed(origin)?;
1398
+
1399
+ // let current_block: BlockNumberFor<T> = <frame_system::Pallet<T>>::block_number();
1400
+ // let duration: BlockNumberFor<T> = DissolveNetworkScheduleDuration::<T>::get();
1401
+ // let when: BlockNumberFor<T> = current_block.saturating_add(duration);
1402
+
1403
+ // let call = Call::<T>::dissolve_network {
1404
+ // coldkey: who.clone(),
1405
+ // netuid,
1406
+ // };
1407
+
1408
+ // let bound_call = T::Preimages::bound(LocalCallOf::<T>::from(call.clone()))
1409
+ // .map_err(|_| Error::<T>::FailedToSchedule)?;
1410
+
1411
+ // T::Scheduler::schedule(
1412
+ // DispatchTime::At(when),
1413
+ // None,
1414
+ // 63,
1415
+ // frame_system::RawOrigin::Root.into(),
1416
+ // bound_call,
1417
+ // )
1418
+ // .map_err(|_| Error::<T>::FailedToSchedule)?;
1419
+
1420
+ // // Emit the SwapScheduled event
1421
+ // Self::deposit_event(Event::DissolveNetworkScheduled {
1422
+ // account: who.clone(),
1423
+ // netuid,
1424
+ // execution_block: when,
1425
+ // });
1426
+
1427
+ // Ok(().into())
1426
1428
}
1427
1429
1428
1430
/// ---- Set prometheus information for the neuron.
0 commit comments