fix get sector nil pointer bug

This commit is contained in:
zlhwdsz 2020-11-24 00:00:14 +08:00
parent 375b7a1c4c
commit 721120fc60

View File

@ -1759,6 +1759,9 @@ var stateSectorCmd = &cli.Command{
if err != nil {
return err
}
if si == nil {
return xerrors.Errorf("sector %d for miner %s not found", sid, maddr)
}
fmt.Println("SectorNumber: ", si.SectorNumber)
fmt.Println("SealProof: ", si.SealProof)