fix: miner: correctly count sector extensions

This commit is contained in:
Aayush 2023-03-22 18:01:01 -04:00
parent ce17546a76
commit 2d9412d97f

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