File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
pallets/subtensor/src/coinbase Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -993,28 +993,26 @@ impl<T: Config> Pallet<T> {
993993 /// * 'NotSubnetOwner': If the caller does not own the specified subnet.
994994 ///
995995 pub fn user_remove_network ( coldkey : T :: AccountId , netuid : u16 ) -> dispatch:: DispatchResult {
996- // --- 1. Ensure the function caller is a signed user.
997-
998- // --- 2. Ensure this subnet exists.
996+ // --- 1. Ensure this subnet exists.
999997 ensure ! (
1000998 Self :: if_subnet_exist( netuid) ,
1001999 Error :: <T >:: SubNetworkDoesNotExist
10021000 ) ;
10031001
1004- // --- 3 . Ensure the caller owns this subnet.
1002+ // --- 2 . Ensure the caller owns this subnet.
10051003 ensure ! (
10061004 SubnetOwner :: <T >:: get( netuid) == coldkey,
10071005 Error :: <T >:: NotSubnetOwner
10081006 ) ;
10091007
1010- // --- 4 . Explicitly erase the network and all its parameters.
1008+ // --- 2 . Explicitly erase the network and all its parameters.
10111009 Self :: remove_network ( netuid) ;
10121010
1013- // --- 5 . Emit the NetworkRemoved event.
1011+ // --- 3 . Emit the NetworkRemoved event.
10141012 log:: debug!( "NetworkRemoved( netuid:{:?} )" , netuid) ;
10151013 Self :: deposit_event ( Event :: NetworkRemoved ( netuid) ) ;
10161014
1017- // --- 6 . Return success.
1015+ // --- 5 . Return success.
10181016 Ok ( ( ) )
10191017 }
10201018
You can’t perform that action at this time.
0 commit comments