Skip to content

Commit

Permalink
Merge pull request #1085 from opentensor/feat/lower-set-children-rate…
Browse files Browse the repository at this point in the history
…-limit

set set_children rate limit to 30min
  • Loading branch information
sam0x17 authored Dec 10, 2024
2 parents 29ea11c + 5965f9b commit 974e76b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pallets/subtensor/src/utils/rate_limiting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl<T: Config> Pallet<T> {
/// Get the rate limit for a specific transaction type
pub fn get_rate_limit(tx_type: &TransactionType) -> u64 {
match tx_type {
TransactionType::SetChildren => 7200, // Cannot set children twice within a day
TransactionType::SetChildren => 150, // 30 minutes
TransactionType::SetChildkeyTake => TxChildkeyTakeRateLimit::<T>::get(),
TransactionType::Unknown => 0, // Default to no limit for unknown types (no limit)
TransactionType::RegisterNetwork => NetworkRateLimit::<T>::get(),
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 215,
spec_version: 216,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit 974e76b

Please sign in to comment.