all: simplify nested complexity and if blocks ending with a return statement (#21854)
Changes: Simplify nested complexity If an if blocks ends with a return statement then remove the else nesting. Most of the changes has also been reported in golint https://goreportcard.com/report/github.com/ethereum/go-ethereum#golint
This commit is contained in:
@@ -588,9 +588,8 @@ func (n *NodeBalance) timeUntil(priority int64) (time.Duration, bool) {
|
||||
}
|
||||
dt = float64(posBalance-newBalance) / timePrice
|
||||
return time.Duration(dt), true
|
||||
} else {
|
||||
dt = float64(posBalance) / timePrice
|
||||
}
|
||||
dt = float64(posBalance) / timePrice
|
||||
} else {
|
||||
if priority > 0 {
|
||||
return 0, false
|
||||
|
Reference in New Issue
Block a user