File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
pallets/subtensor/src/subnets Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,9 @@ impl<T: Config> Pallet<T> {
119
119
Error :: <T >:: NotEnoughBalanceToStake
120
120
) ;
121
121
122
+ // If the network account does not exist we will create it here.
123
+ Self :: create_account_if_non_existent ( & coldkey, & hotkey) ;
124
+
122
125
// --- 8. Ensure that the pairing is correct.
123
126
ensure ! (
124
127
Self :: coldkey_owns_hotkey( & coldkey, & hotkey) ,
@@ -139,9 +142,6 @@ impl<T: Config> Pallet<T> {
139
142
let burned_alpha: u64 = Self :: swap_tao_for_alpha ( netuid, actual_burn_amount) ;
140
143
SubnetAlphaOut :: < T > :: mutate ( netuid, |total| * total = total. saturating_sub ( burned_alpha) ) ;
141
144
142
- // --- 11. If the network account does not exist we will create it here.
143
- Self :: create_account_if_non_existent ( & coldkey, & hotkey) ;
144
-
145
145
// Actually perform the registration.
146
146
let neuron_uid: u16 = Self :: register_neuron ( netuid, & hotkey) ;
147
147
You can’t perform that action at this time.
0 commit comments