Skip to content

Commit

Permalink
improve check for EnsureNoStaleBallots to ignore Pending Ballots
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Mar 4, 2025
1 parent f104014 commit 2a44a8b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion e2e/runner/require.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ func (r *E2ERunner) EnsureNoStaleBallots() {
if len(ballotsRes.Ballots) < 1 {
return
}
firstBallotCreationHeight := ballotsRes.Ballots[0].BallotCreationHeight
firstBallotCreationHeight := int64(0)

for _, ballot := range ballotsRes.Ballots {
if ballot.IsFinalized() {
firstBallotCreationHeight = ballot.BallotCreationHeight
}
}
require.GreaterOrEqual(r, firstBallotCreationHeight, staleBlockStart, "there should be no stale ballots")
}

0 comments on commit 2a44a8b

Please sign in to comment.