From e5a48800ab25c546bbee4cda4d9d3540049af608 Mon Sep 17 00:00:00 2001 From: Yang Date: Thu, 30 Jan 2020 15:02:50 +0800 Subject: [PATCH] fix:a bug of the power percentage in lotus-storage-miner info --- cmd/lotus-storage-miner/info.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/lotus-storage-miner/info.go b/cmd/lotus-storage-miner/info.go index a7c8b0d58..e2d83b1ee 100644 --- a/cmd/lotus-storage-miner/info.go +++ b/cmd/lotus-storage-miner/info.go @@ -50,8 +50,8 @@ var infoCmd = &cli.Command{ return err } - percI := types.BigDiv(types.BigMul(pow.MinerPower, types.NewInt(1000)), pow.TotalPower) - fmt.Printf("Power: %s / %s (%0.4f%%)\n", pow.MinerPower.SizeStr(), pow.TotalPower.SizeStr(), float64(percI.Int64())/100000*10000) + percI := types.BigDiv(types.BigMul(pow.MinerPower, types.NewInt(1000000)), pow.TotalPower) + fmt.Printf("Power: %s / %s (%0.4f%%)\n", pow.MinerPower.SizeStr(), pow.TotalPower.SizeStr(), float64(percI.Int64())/10000) secCounts, err := api.StateMinerSectorCount(ctx, maddr, nil) if err != nil {