fix: miner: correctly count sector extensions

This commit is contained in:
Aayush 2023-03-22 18:01:01 -04:00
parent 3f8a41cfe8
commit a467e1ab31

View File

@ -1160,8 +1160,9 @@ var sectorsExtendCmd = &cli.Command{
} }
sectorsInDecl := int(sectorsWithoutClaimsCount) + len(sectorsWithClaims) 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) params = append(params, p)
p = miner.ExtendSectorExpiration2Params{} p = miner.ExtendSectorExpiration2Params{}
scount = sectorsInDecl scount = sectorsInDecl