Skip to content

Commit

Permalink
Review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M committed Jan 12, 2024
1 parent c58d9b6 commit e9ee9e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdk/src/types/block/output/delegation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ impl DelegationOutput {
.ok_or(StateTransitionError::MissingCommitmentContextInput)?;

let future_bounded_slot: SlotIndex = slot_commitment_id.slot_index() + protocol_parameters.min_committable_age;
let future_bounded_epoch =
EpochIndex::from_slot_index(future_bounded_slot, protocol_parameters.slots_per_epoch_exponent);
let future_bounded_epoch = future_bounded_slot.to_epoch_index(protocol_parameters.slots_per_epoch_exponent);

let registration_slot = future_bounded_epoch.registration_slot(
protocol_parameters.slots_per_epoch_exponent,
Expand All @@ -363,7 +362,7 @@ impl DelegationOutput {
let expected_end_epoch = if future_bounded_slot <= registration_slot {
future_bounded_epoch
} else {
EpochIndex(*future_bounded_epoch + 1)
future_bounded_epoch + 1
};

if next_state.end_epoch != expected_end_epoch {
Expand Down

0 comments on commit e9ee9e6

Please sign in to comment.