Skip to content

Commit

Permalink
fix: niporep: unflake provecommit failure for niporep
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Jun 26, 2024
1 parent 1e8bc10 commit f7632ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions itests/kit/node_unmanaged.go
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,6 @@ func (tm *TestUnmanagedMiner) IsImmutableDeadline(ctx context.Context, deadlineI
di, err := tm.FullNode.StateMinerProvingDeadline(ctx, tm.ActorAddr, types.EmptyTSK)
require.NoError(tm.t, err)
// don't rely on di.Index because if we haven't enrolled in cron it won't be ticking
currentDeadline := uint64((di.CurrentEpoch - di.PeriodStart) / di.WPoStChallengeWindow)
return currentDeadline == deadlineIndex || currentDeadline == deadlineIndex-1
currentDeadlineIdx := uint64(math.Abs(float64((di.CurrentEpoch - di.PeriodStart) / di.WPoStChallengeWindow)))
return currentDeadlineIdx == deadlineIndex || currentDeadlineIdx == deadlineIndex-1
}

0 comments on commit f7632ed

Please sign in to comment.