Skip to content

Commit

Permalink
Merge pull request #8205 from s1mple1122/master
Browse files Browse the repository at this point in the history
avoid panic
  • Loading branch information
magik6k authored Feb 28, 2022
2 parents f9900ba + 296ae43 commit 6291c0c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/lotus-miner/sealing.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ func barString(total, y, g float64) string {
yBars := int(math.Round(y / total * barCols))
gBars := int(math.Round(g / total * barCols))
eBars := int(barCols) - yBars - gBars
return color.YellowString(strings.Repeat("|", yBars)) +
color.GreenString(strings.Repeat("|", gBars)) +
strings.Repeat(" ", eBars)
var barString = color.YellowString(strings.Repeat("|", yBars)) +
color.GreenString(strings.Repeat("|", gBars))
if eBars >= 0 {
barString += strings.Repeat(" ", eBars)
}
return barString
}

var sealingWorkersCmd = &cli.Command{
Expand Down

0 comments on commit 6291c0c

Please sign in to comment.