Fix TestWindowPostDispute

This commit is contained in:
Łukasz Magiera 2021-06-01 19:11:32 +02:00
parent 49fce48c3e
commit 8072573292

View File

@ -543,7 +543,7 @@ func TestWindowPostDispute(t *testing.T, b APIBuilder, blocktime time.Duration)
for {
di, err = client.StateMinerProvingDeadline(ctx, evilMinerAddr, types.EmptyTSK)
require.NoError(t, err)
if di.Index == evilSectorLoc.Deadline {
if di.Index == evilSectorLoc.Deadline && di.CurrentEpoch - di.PeriodStart > 1 {
break
}
build.Clock.Sleep(blocktime)
@ -640,7 +640,7 @@ func TestWindowPostDispute(t *testing.T, b APIBuilder, blocktime time.Duration)
for {
di, err = client.StateMinerProvingDeadline(ctx, evilMinerAddr, types.EmptyTSK)
require.NoError(t, err)
if di.Index == evilSectorLoc.Deadline {
if di.Index == evilSectorLoc.Deadline && di.CurrentEpoch - di.PeriodStart > 1 {
break
}
build.Clock.Sleep(blocktime)