fix build after merging #6097. (#7096)

fix build after merging #6097.
This commit is contained in:
raulk 2021-08-16 23:18:32 +01:00 committed by GitHub
parent 10615b53ad
commit 473a192b85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -845,7 +845,15 @@ var sectorsRenewCmd = &cli.Command{
for l, exts := range extensions {
for newExp, numbers := range exts {
scount += len(numbers)
if scount > policy.GetAddressedSectorsMax(nv) || len(p.Extensions) == policy.GetDeclarationsMax(nv) {
addrSectors, err := policy.GetAddressedSectorsMax(nv)
if err != nil {
return err
}
declMax, err := policy.GetDeclarationsMax(nv)
if err != nil {
return err
}
if scount > addrSectors || len(p.Extensions) == declMax {
params = append(params, p)
p = miner5.ExtendSectorExpirationParams{}
scount = len(numbers)