Skip to content

Commit 395105b

Browse files
Comment Pallet::try_increase_staking_counter in pallet_subtensor
Co-authored-by: Cameron Fairchild <[email protected]>
1 parent 74db144 commit 395105b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pallets/subtensor/src/utils/misc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ impl<T: Config> Pallet<T> {
167167
let (stakes_count, last_staked_at) =
168168
TotalHotkeyColdkeyStakesThisInterval::<T>::get(coldkey, hotkey);
169169

170+
// Reset staking counter if it's been stake_interval blocks since the first staking action of the series.
170171
if stakes_count == 0 || last_staked_at.saturating_add(stake_interval) <= current_block {
171172
TotalHotkeyColdkeyStakesThisInterval::<T>::insert(coldkey, hotkey, (1, current_block));
172173
return Ok(());

0 commit comments

Comments
 (0)