Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
para scheduler: fix division (#7339)
Browse files Browse the repository at this point in the history
* para scheduler: fix  division

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update runtime/parachains/src/scheduler.rs

Co-authored-by: Liam Aharon <[email protected]>

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Kian Paimani <[email protected]>
Co-authored-by: Liam Aharon <[email protected]>
  • Loading branch information
3 people authored Jun 11, 2023
1 parent b1cc6fa commit b6576d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/parachains/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ impl<T: Config> Pallet<T> {
let session_start = <SessionStartBlock<T>>::get();
let blocks_since_session_start = now.saturating_sub(session_start);
let blocks_since_last_rotation =
blocks_since_session_start % config.group_rotation_frequency;
blocks_since_session_start % config.group_rotation_frequency.max(1u8.into());

let absolute_cutoff =
sp_std::cmp::max(config.chain_availability_period, config.thread_availability_period);
Expand Down

0 comments on commit b6576d1

Please sign in to comment.