Merge pull request #378 from filecoin-project/fix/miner-info-format

Fix percentage display
This commit is contained in:
Łukasz Magiera 2019-10-15 17:30:31 +02:00 committed by GitHub
commit 71182f69cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ var infoCmd = &cli.Command{
}
percI := types.BigDiv(types.BigMul(pow.MinerPower, types.NewInt(1000)), pow.TotalPower)
fmt.Printf("Power: %s / %s (%0.2f%%)\n", pow.MinerPower, pow.TotalPower, float64(percI.Int64())/1000)
fmt.Printf("Power: %s / %s (%0.2f%%)\n", pow.MinerPower, pow.TotalPower, float64(percI.Int64())/1000*100)
sinfo, err := sectorsInfo(ctx, nodeApi)
if err != nil {