File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
pallets/subtensor/src/staking Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,23 @@ impl<T: Config> Pallet<T> {
6060
6161 // Ensure the hotkey passes the rate limit.
6262 ensure ! (
63- Self :: passes_rate_limit_globally (
63+ Self :: passes_rate_limit_on_subnet (
6464 & TransactionType :: SetChildren , // Set children.
6565 & hotkey, // Specific to a hotkey.
66+ netuid, // Specific to a subnet.
6667 ) ,
6768 Error :: <T >:: TxRateLimitExceeded
6869 ) ;
6970
71+ // Set last transaction block
72+ let current_block = Self :: get_current_block_as_u64 ( ) ;
73+ Self :: set_last_transaction_block (
74+ & hotkey,
75+ netuid,
76+ & TransactionType :: SetChildren ,
77+ current_block
78+ ) ;
79+
7080 // --- 2. Check that this delegation is not on the root network. Child hotkeys are not valid on root.
7181 ensure ! (
7282 netuid != Self :: get_root_netuid( ) ,
You can’t perform that action at this time.
0 commit comments