From 2d9412d97fd1896d0dcd340222b53eb5ec34af9a 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 93c950d7c0..cbf1c33184 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 3070227b00a3f34799d773d44b4f1912f3f3909b 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 cbf1c33184..8d3a4c8847 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)