Skip to content

Commit

Permalink
Fix strange CI failure.
Browse files Browse the repository at this point in the history
The range of generated expired epochs and unexpired epochs overlaped at
point 100, which caused the `genExpiredOrResigned` to assume that all
`Yes` voting committee members are to be expired, but according to the
spec we consider members expired only after the current epoch is greater
than their expiry epoch, whereas in this case both were 100.

The range of the generator has been adjusted according to these
semantics.
  • Loading branch information
aniketd committed Apr 25, 2024
1 parent 2f0ad36 commit 26f397f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ genNonExpiredEpoch :: Gen EpochNo
genNonExpiredEpoch = EpochNo <$> choose (1000, maxBound)

genExpiredEpoch :: Gen EpochNo
genExpiredEpoch = EpochNo <$> choose (0, 100)
genExpiredEpoch = EpochNo <$> choose (0, 99)

genNonResignedCommitteeState ::
forall era.
Expand Down

0 comments on commit 26f397f

Please sign in to comment.