test sector status on expiring sectors
This commit is contained in:
parent
bdc782617f
commit
ddcbcdea48
@ -94,6 +94,22 @@ func TestCCUpgrade(t *testing.T, b APIBuilder, blocktime time.Duration) {
|
|||||||
require.Less(t, 50000, int(exp.OnTime))
|
require.Less(t, 50000, int(exp.OnTime))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dlInfo, err := client.StateMinerProvingDeadline(ctx, maddr, types.EmptyTSK)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
// Sector should expire.
|
||||||
|
for {
|
||||||
|
// Wait for the sector to expire.
|
||||||
|
status, err := miner.SectorsStatus(ctx, CC, true)
|
||||||
|
require.NoError(t, err)
|
||||||
|
if status.OnTime == 0 && status.Early == 0 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
t.Log("waiting for sector to expire")
|
||||||
|
// wait one deadline per loop.
|
||||||
|
time.Sleep(time.Duration(dlInfo.WPoStChallengeWindow) * blocktime)
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Println("shutting down mining")
|
fmt.Println("shutting down mining")
|
||||||
atomic.AddInt64(&mine, -1)
|
atomic.AddInt64(&mine, -1)
|
||||||
<-done
|
<-done
|
||||||
|
Loading…
Reference in New Issue
Block a user