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 authored and ribasushi committed Aug 20, 2024
1 parent f95eeb1 commit 0ea28a8
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 0ea28a8

Please sign in to comment.