From a467e1ab3158d1c289ced9ef9912ad97be057bca Mon Sep 17 00:00:00 2001 From: Aayush Date: Wed, 22 Mar 2023 18:01:01 -0400 Subject: [PATCH 1/2] fix: miner: correctly count sector extensions --- cmd/lotus-miner/sectors.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/lotus-miner/sectors.go b/cmd/lotus-miner/sectors.go index 93c950d7c..cbf1c3318 100644 --- a/cmd/lotus-miner/sectors.go +++ b/cmd/lotus-miner/sectors.go @@ -1160,8 +1160,9 @@ var sectorsExtendCmd = &cli.Command{ } sectorsInDecl := int(sectorsWithoutClaimsCount) + len(sectorsWithClaims) + scount += sectorsInDecl - if scount+sectorsInDecl > addrSectors || len(p.Extensions) >= declMax { + if scount > addrSectors || len(p.Extensions) >= declMax { params = append(params, p) p = miner.ExtendSectorExpiration2Params{} scount = sectorsInDecl From 7b55de21bdd80f637d340f17261200be36d7f70b Mon Sep 17 00:00:00 2001 From: Aayush Date: Thu, 23 Mar 2023 17:28:11 -0400 Subject: [PATCH 2/2] fix: miner: call ExtendSectorExpiration2 --- cmd/lotus-miner/sectors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/lotus-miner/sectors.go b/cmd/lotus-miner/sectors.go index cbf1c3318..8d3a4c884 100644 --- a/cmd/lotus-miner/sectors.go +++ b/cmd/lotus-miner/sectors.go @@ -1231,7 +1231,7 @@ var sectorsExtendCmd = &cli.Command{ smsg, err := fullApi.MpoolPushMessage(ctx, &types.Message{ From: mi.Worker, To: maddr, - Method: builtin.MethodsMiner.ExtendSectorExpiration, + Method: builtin.MethodsMiner.ExtendSectorExpiration2, Value: big.Zero(), Params: sp, }, spec)