Merge pull request #555 from filecoin-project/fix/storageinfo-nline

storageminer: Add missing new line in info cmd
This commit is contained in:
Łukasz Magiera 2019-11-09 11:35:05 +01:00 committed by GitHub
commit ea13bce02d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View File

@ -110,6 +110,7 @@ func (ft *fetch) checkFile(path string, info paramFile) error {
sum := h.Sum(nil)
strSum := hex.EncodeToString(sum[:16])
if strSum == info.Digest {
log.Infof("Parameter file %s is ok", path)
return nil
}

View File

@ -7,6 +7,7 @@ import (
"gopkg.in/urfave/cli.v2"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types"
lcli "github.com/filecoin-project/lotus/cli"
)
@ -57,14 +58,26 @@ var infoCmd = &cli.Command{
if err != nil {
return err
}
fmt.Printf("Worker use: %d / %d (+%d)", wstat.Total-wstat.Reserved-wstat.Free, wstat.Total, wstat.Reserved)
fmt.Printf("Worker use: %d / %d (+%d)\n", wstat.Total-wstat.Reserved-wstat.Free, wstat.Total, wstat.Reserved)
ppe, err := api.StateMinerProvingPeriodEnd(ctx, maddr, nil)
if err != nil {
return err
}
head, err := api.ChainHead(ctx)
if err != nil {
return err
}
pdiff := ppe-head.Height()
pdifft := pdiff * build.BlockDelay
fmt.Printf("Proving Period: %d, in %d Blocks (~%dm %ds)\n", ppe, pdiff, pdifft / 60, pdifft % 60)
sinfo, err := sectorsInfo(ctx, nodeApi)
if err != nil {
return err
}
fmt.Println(sinfo)
fmt.Println("Sectors: ", sinfo)
// TODO: grab actr state / info
// * Sealed sectors (count / bytes)