diff --git a/pallets/subtensor/src/subnets/weights.rs b/pallets/subtensor/src/subnets/weights.rs index ed7708448..765ee7a0d 100644 --- a/pallets/subtensor/src/subnets/weights.rs +++ b/pallets/subtensor/src/subnets/weights.rs @@ -262,7 +262,11 @@ impl Pallet { // 5. Retrieve or initialize the VecDeque of commits for the hotkey. let cur_block = Self::get_current_block_as_u64(); - let cur_epoch = Self::get_epoch_index(netuid, cur_block); + let cur_epoch = match Self::should_run_epoch(netuid, commit_block) { + true => Self::get_epoch_index(netuid, cur_block).saturating_add(1), + false => Self::get_epoch_index(netuid, cur_block) + }; + CRV3WeightCommits::::try_mutate(netuid, cur_epoch, |commits| -> DispatchResult { // 6. Verify that the number of unrevealed commits is within the allowed limit.