We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fae9db0 commit 9f09d94Copy full SHA for 9f09d94
pallets/subtensor/src/root.rs
@@ -577,8 +577,8 @@ impl<T: Config> Pallet<T> {
577
}
578
579
// --- 15. Update the registration counters for both the block and interval.
580
- RegistrationsThisInterval::<T>::mutate(root_netuid, |val| *val += 1);
581
- RegistrationsThisBlock::<T>::mutate(root_netuid, |val| *val += 1);
+ RegistrationsThisInterval::<T>::mutate(root_netuid, |val| val.saturating_inc());
+ RegistrationsThisBlock::<T>::mutate(root_netuid, |val| val.saturating_inc());
582
583
// --- 16. Log and announce the successful registration.
584
log::info!(
0 commit comments