storageminer: Don't print PP in info cmd if not proving
This commit is contained in:
parent
4e6e83149a
commit
b8e18ed773
@ -64,6 +64,7 @@ var infoCmd = &cli.Command{
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if ppe != 0 {
|
||||||
head, err := api.ChainHead(ctx)
|
head, err := api.ChainHead(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -71,6 +72,10 @@ var infoCmd = &cli.Command{
|
|||||||
pdiff := int64(ppe - head.Height())
|
pdiff := int64(ppe - head.Height())
|
||||||
pdifft := pdiff * build.BlockDelay
|
pdifft := pdiff * build.BlockDelay
|
||||||
fmt.Printf("Proving Period: %d, in %d Blocks (~%dm %ds)\n", ppe, pdiff, pdifft/60, pdifft%60)
|
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)
|
sinfo, err := sectorsInfo(ctx, nodeApi)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user