Merge pull request #10544 from filecoin-project/asr/fix-extend-sectors

fix: miner: correctly count sector extensions
This commit is contained in:
Aayush Rajasekaran 2023-03-30 10:10:42 -04:00 committed by GitHub
commit 13f73623a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
@ -1230,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)