Merge pull request #9703 from filecoin-project/asr/fix-panic
fix: cli: check found before dereferencing SectorInfo
This commit is contained in:
commit
70dc920f8c
@ -919,12 +919,12 @@ var sectorsRenewCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
si, found := activeSectorsInfo[abi.SectorNumber(id)]
|
si, found := activeSectorsInfo[abi.SectorNumber(id)]
|
||||||
if len(si.DealIDs) > 0 && cctx.Bool("only-cc") {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if !found {
|
if !found {
|
||||||
return xerrors.Errorf("sector %d is not active", id)
|
return xerrors.Errorf("sector %d is not active", id)
|
||||||
}
|
}
|
||||||
|
if len(si.DealIDs) > 0 && cctx.Bool("only-cc") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
sis = append(sis, si)
|
sis = append(sis, si)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user