Skip to content

Commit

Permalink
🩹 fixing max_registrations per block
Browse files Browse the repository at this point in the history
  • Loading branch information
PsicoThePato committed Feb 14, 2024
1 parent b6b1a76 commit dd5a1e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pallets/subspace/src/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ impl<T: Config> Pallet<T> {

let min_burn: u64 = Self::get_min_burn();

let max_registrations_per_block: u16 = MaxRegistrationsPerBlock::<T>::get();
ensure!(
RegistrationsPerBlock::<T>::get() < max_registrations_per_block,
Error::<T>::TooManyRegistrationsPerBlock
);
RegistrationsPerBlock::<T>::mutate(|val| *val += 1);

let mut uid: u16;

let n: u16 = Self::get_subnet_n(netuid);
Expand Down

0 comments on commit dd5a1e5

Please sign in to comment.