From f7632ed11ed51154f684e68e4361a0409891f5c4 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 26 Jun 2024 15:33:58 +1000 Subject: [PATCH] fix: niporep: unflake provecommit failure for niporep --- itests/kit/node_unmanaged.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/itests/kit/node_unmanaged.go b/itests/kit/node_unmanaged.go index 53ccb342bea..5dc3ed379ad 100644 --- a/itests/kit/node_unmanaged.go +++ b/itests/kit/node_unmanaged.go @@ -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 }