Skip to content

Commit

Permalink
Added an option to show or not show sector info for lotus-miner info
Browse files Browse the repository at this point in the history
  • Loading branch information
jennijuju committed Sep 24, 2020
1 parent 80ee3be commit 3d7adba
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions cmd/lotus-storage-miner/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ var infoCmd = &cli.Command{
Subcommands: []*cli.Command{
infoAllCmd,
},
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "show-sectors-info",
Usage: "show sectors info",
},
},
Action: infoCmdAct,
}

Expand Down Expand Up @@ -199,10 +205,12 @@ func infoCmdAct(cctx *cli.Context) error {

fmt.Printf("Expected Seal Duration: %s\n\n", sealdur)

fmt.Println("Sectors:")
err = sectorsInfo(ctx, nodeApi)
if err != nil {
return err
if cctx.Bool("show-sectors") {
fmt.Println("Sectors:")
err = sectorsInfo(ctx, nodeApi)
if err != nil {
return err
}
}

// TODO: grab actr state / info
Expand Down

0 comments on commit 3d7adba

Please sign in to comment.