Skip to content

Commit

Permalink
Merge pull request #8952 from filecoin-project/feat/prov-dl-info-nums
Browse files Browse the repository at this point in the history
feat: cli: Hide sector nums in 'proving deadline' by default
  • Loading branch information
magik6k authored Jul 4, 2022
2 parents d5206aa + 9ad7276 commit 2e7a2b1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
23 changes: 17 additions & 6 deletions cmd/lotus-miner/proving.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,15 @@ var provingDeadlinesCmd = &cli.Command{
}

var provingDeadlineInfoCmd = &cli.Command{
Name: "deadline",
Usage: "View the current proving period deadline information by its index ",
Name: "deadline",
Usage: "View the current proving period deadline information by its index",
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "sector-nums",
Aliases: []string{"n"},
Usage: "Print sector/fault numbers belonging to this deadline",
},
},
ArgsUsage: "<deadlineIdx>",
Action: func(cctx *cli.Context) error {

Expand Down Expand Up @@ -342,10 +349,14 @@ var provingDeadlineInfoCmd = &cli.Command{
}

fmt.Printf("Partition Index: %d\n", pIdx)
fmt.Printf("Sectors: %d\n", sectorCount)
fmt.Printf("Sector Numbers: %v\n", sectorNumbers)
fmt.Printf("Faults: %d\n", faultsCount)
fmt.Printf("Faulty Sectors: %d\n", fn)
fmt.Printf("\tSectors: %d\n", sectorCount)
if cctx.Bool("sector-nums") {
fmt.Printf("\tSector Numbers: %v\n", sectorNumbers)
}
fmt.Printf("\tFaults: %d\n", faultsCount)
if cctx.Bool("sector-nums") {
fmt.Printf("\tFaulty Sectors: %d\n", fn)
}
}
return nil
},
Expand Down
6 changes: 3 additions & 3 deletions documentation/en/cli-lotus-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,7 @@ USAGE:
COMMANDS:
info View current state information
deadlines View the current proving period deadlines information
deadline View the current proving period deadline information by its index
deadline View the current proving period deadline information by its index
faults View the currently known proving faulty sectors information
check Check sectors provable
workers list workers
Expand Down Expand Up @@ -2062,13 +2062,13 @@ OPTIONS:
### lotus-miner proving deadline
```
NAME:
lotus-miner proving deadline - View the current proving period deadline information by its index
lotus-miner proving deadline - View the current proving period deadline information by its index
USAGE:
lotus-miner proving deadline [command options] <deadlineIdx>
OPTIONS:
--help, -h show help (default: false)
--sector-nums, -n Print sector/fault numbers belonging to this deadline (default: false)
```

Expand Down

0 comments on commit 2e7a2b1

Please sign in to comment.