File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -866,7 +866,6 @@ impl<T: Config> Pallet<T> {
866866 current_coldkey : T :: AccountId ,
867867 new_coldkey : T :: AccountId ,
868868 ) -> DispatchResult {
869-
870869 // Ensure the new coldkey is different from the current one
871870 ensure ! ( current_coldkey != new_coldkey, Error :: <T >:: SameColdkey ) ;
872871
@@ -885,7 +884,8 @@ impl<T: Config> Pallet<T> {
885884 ) ;
886885
887886 // Get the current stake
888- let current_stake: u64 = Self :: get_stake_for_coldkey_and_hotkey ( & current_coldkey, & next_hotkey) ;
887+ let current_stake: u64 =
888+ Self :: get_stake_for_coldkey_and_hotkey ( & current_coldkey, & next_hotkey) ;
889889
890890 // Unstake all balance if there's any stake
891891 if current_stake > 0 {
@@ -895,7 +895,6 @@ impl<T: Config> Pallet<T> {
895895 current_stake,
896896 ) ?;
897897 }
898-
899898 }
900899
901900 let total_balance = Self :: get_coldkey_balance ( & current_coldkey) ;
Original file line number Diff line number Diff line change @@ -3181,11 +3181,10 @@ fn test_do_unstake_all_and_transfer_to_new_coldkey_success() {
31813181 } ) ;
31823182}
31833183
3184-
31853184#[ test]
31863185fn test_do_unstake_all_and_transfer_to_new_coldkey_same_coldkey ( ) {
31873186 new_test_ext ( 1 ) . execute_with ( || {
3188- let ( current_coldkey, hotkey , _) = setup_test_environment ( ) ;
3187+ let ( current_coldkey, _hotkey , _) = setup_test_environment ( ) ;
31893188
31903189 assert_noop ! (
31913190 SubtensorModule :: do_unstake_all_and_transfer_to_new_coldkey(
@@ -3373,11 +3372,9 @@ fn test_do_unstake_all_and_transfer_to_new_coldkey_with_multiple_stakes() {
33733372 } ) ;
33743373}
33753374
3376-
33773375#[ test]
33783376fn test_do_unstake_all_and_transfer_to_new_coldkey_with_multiple_stakes_multiple ( ) {
33793377 new_test_ext ( 1 ) . execute_with ( || {
3380-
33813378 // Register the neuron to a new network
33823379 let netuid = 1 ;
33833380 let hotkey0 = U256 :: from ( 1 ) ;
@@ -3415,4 +3412,4 @@ fn test_do_unstake_all_and_transfer_to_new_coldkey_with_multiple_stakes_multiple
34153412 . into ( ) ,
34163413 ) ;
34173414 } ) ;
3418- }
3415+ }
You can’t perform that action at this time.
0 commit comments