storageminer: Don't print PP in info cmd if not proving

This commit is contained in:
Łukasz Magiera 2019-11-09 13:11:46 +01:00
parent 4e6e83149a
commit b8e18ed773

View File

@ -64,6 +64,7 @@ var infoCmd = &cli.Command{
if err != nil {
return err
}
if ppe != 0 {
head, err := api.ChainHead(ctx)
if err != nil {
return err
@ -71,6 +72,10 @@ var infoCmd = &cli.Command{
pdiff := int64(ppe - head.Height())
pdifft := pdiff * build.BlockDelay
fmt.Printf("Proving Period: %d, in %d Blocks (~%dm %ds)\n", ppe, pdiff, pdifft/60, pdifft%60)
} else {
fmt.Printf("Proving Period: Not Proving\n")
}
sinfo, err := sectorsInfo(ctx, nodeApi)
if err != nil {