From 499536a17ff50fe812da6b9bf8d1a3448a19f919 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 12 Jul 2024 16:58:23 +1000 Subject: [PATCH] fix: test: use parents instead of height-1 to calculate sector activation epoch Ref: https://github.com/filecoin-project/lotus/issues/12001 Ref: https://github.com/filecoin-project/lotus/actions/runs/9887807887/job/27310358031?pr=12207 --- itests/kit/node_unmanaged.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/itests/kit/node_unmanaged.go b/itests/kit/node_unmanaged.go index 3812d5a33cb..910dbd48edc 100644 --- a/itests/kit/node_unmanaged.go +++ b/itests/kit/node_unmanaged.go @@ -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") }