Skip to content

Commit

Permalink
Fix arith error
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner committed Sep 28, 2020
1 parent 178d7d3 commit df3bba1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion consensus/types/src/shuffling_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ impl ShufflingId {
) -> Result<Self, BeaconStateError> {
let shuffling_epoch = relative_epoch.into_epoch(state.current_epoch());

let shuffling_decision_slot = (shuffling_epoch - 1).start_slot(E::slots_per_epoch()) - 1;
let shuffling_decision_slot = shuffling_epoch
.saturating_sub(1_u64)
.start_slot(E::slots_per_epoch())
.saturating_sub(1_u64);

let shuffling_decision_block = if state.slot == shuffling_decision_slot {
block_root
Expand Down

0 comments on commit df3bba1

Please sign in to comment.