Skip to content

Commit

Permalink
fix: test: use parents instead of height-1 to calculate sector activa…
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Jul 12, 2024
1 parent bb014ff commit 499536a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion itests/kit/node_unmanaged.go
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,12 @@ func (tm *TestUnmanagedMiner) submitProveCommit(
if exitCodes[i].IsSuccess() {
req.NoError(err)
req.Equal(si.SectorNumber, sector.sectorNumber)
req.Equal(si.Activation, msgReturn.Height-1)
// To check the activation epoch, we use Parents() rather than Height-1 to account for null rounds
ts, err := tm.FullNode.ChainGetTipSet(tm.ctx, msgReturn.TipSet)
req.NoError(err)
parent, err := tm.FullNode.ChainGetTipSet(tm.ctx, ts.Parents())
req.NoError(err)
req.Equal(si.Activation, parent.Height())
} else {
req.Nil(si, "sector should not be on chain")
}
Expand Down

0 comments on commit 499536a

Please sign in to comment.