Add CLI command to manually start sealing a sector
This commit is contained in:
parent
655d6f6720
commit
45fdcaea45
@ -29,6 +29,7 @@ var sectorsCmd = &cli.Command{
|
||||
sectorsPledgeCmd,
|
||||
sectorsRemoveCmd,
|
||||
sectorsMarkForUpgradeCmd,
|
||||
sectorsStartSealCmd,
|
||||
},
|
||||
}
|
||||
|
||||
@ -268,6 +269,30 @@ var sectorsMarkForUpgradeCmd = &cli.Command{
|
||||
},
|
||||
}
|
||||
|
||||
var sectorsStartSealCmd = &cli.Command{
|
||||
Name: "seal",
|
||||
Usage: "Manually start sealing a sector (filling any unused space with junk)",
|
||||
ArgsUsage: "<sectorNum>",
|
||||
Action: func(cctx *cli.Context) error {
|
||||
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer closer()
|
||||
ctx := lcli.ReqContext(cctx)
|
||||
if cctx.Args().Len() != 1 {
|
||||
return xerrors.Errorf("must pass sector number")
|
||||
}
|
||||
|
||||
id, err := strconv.ParseUint(cctx.Args().Get(0), 10, 64)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("could not parse sector number: %w", err)
|
||||
}
|
||||
|
||||
return nodeApi.SectorStartSealing(ctx, abi.SectorNumber(id))
|
||||
},
|
||||
}
|
||||
|
||||
var sectorsUpdateCmd = &cli.Command{
|
||||
Name: "update-state",
|
||||
Usage: "ADVANCED: manually update the state of a sector, this may aid in error recovery",
|
||||
|
Loading…
Reference in New Issue
Block a user