Skip to content

Commit 2a44a8b

Browse files
committed
improve check for EnsureNoStaleBallots to ignore Pending Ballots
1 parent f104014 commit 2a44a8b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

e2e/runner/require.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ func (r *E2ERunner) EnsureNoStaleBallots() {
7474
if len(ballotsRes.Ballots) < 1 {
7575
return
7676
}
77-
firstBallotCreationHeight := ballotsRes.Ballots[0].BallotCreationHeight
77+
firstBallotCreationHeight := int64(0)
78+
79+
for _, ballot := range ballotsRes.Ballots {
80+
if ballot.IsFinalized() {
81+
firstBallotCreationHeight = ballot.BallotCreationHeight
82+
}
83+
}
7884
require.GreaterOrEqual(r, firstBallotCreationHeight, staleBlockStart, "there should be no stale ballots")
7985
}

0 commit comments

Comments
 (0)