File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,10 @@ 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(
64+ & TransactionType :: SetChildren , // Set children.
6465 & hotkey, // Specific to a hotkey.
6566 netuid, // Specific to a subnet.
66- & TransactionType :: SetChildren , // Set children.
6767 ) ,
6868 Error :: <T >:: TxRateLimitExceeded
6969 ) ;
Original file line number Diff line number Diff line change @@ -58,11 +58,8 @@ impl<T: Config> Pallet<T> {
5858 }
5959
6060 /// Check if a transaction should be rate limited globally
61- pub fn passes_rate_limit_globally (
62- hotkey : & T :: AccountId ,
63- netuid : u16 ,
64- tx_type : & TransactionType ,
65- ) -> bool {
61+ pub fn passes_rate_limit_globally ( tx_type : & TransactionType , hotkey : & T :: AccountId ) -> bool {
62+ let netuid: u16 = u16:: MAX ;
6663 let block: u64 = Self :: get_current_block_as_u64 ( ) ;
6764 let limit: u64 = Self :: get_rate_limit ( tx_type) ;
6865 let last_block: u64 = Self :: get_last_transaction_block ( hotkey, netuid, tx_type) ;
You can’t perform that action at this time.
0 commit comments