File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
pallets/subtensor/src/staking Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,6 @@ impl<T: Config> Pallet<T> {
59
59
Error :: <T >:: TxRateLimitExceeded
60
60
) ;
61
61
62
- // Set last transaction block
63
- let current_block = Self :: get_current_block_as_u64 ( ) ;
64
- Self :: set_last_transaction_block_on_subnet (
65
- & hotkey,
66
- netuid,
67
- & TransactionType :: SetChildren ,
68
- current_block,
69
- ) ;
70
-
71
62
// Check that this delegation is not on the root network. Child hotkeys are not valid on root.
72
63
ensure ! (
73
64
netuid != Self :: get_root_netuid( ) ,
@@ -119,6 +110,15 @@ impl<T: Config> Pallet<T> {
119
110
Error :: <T >:: NotEnoughStakeToSetChildkeys
120
111
) ;
121
112
113
+ // Set last transaction block
114
+ let current_block = Self :: get_current_block_as_u64 ( ) ;
115
+ Self :: set_last_transaction_block_on_subnet (
116
+ & hotkey,
117
+ netuid,
118
+ & TransactionType :: SetChildren ,
119
+ current_block,
120
+ ) ;
121
+
122
122
// Calculate cool-down block
123
123
let cooldown_block =
124
124
Self :: get_current_block_as_u64 ( ) . saturating_add ( DefaultPendingCooldown :: < T > :: get ( ) ) ;
You can’t perform that action at this time.
0 commit comments