Skip to content

Commit f1609fa

Browse files
committed
fix linter
1 parent 70d12c3 commit f1609fa

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

utils/math/exponential.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ func CalculateExponential(
5353

5454
maxOutput uint256.Int
5555
)
56-
num.SetUint64(uint64(numerator)) // range is [0, MaxUint64]
57-
denom.SetUint64(uint64(denominator)) // range is [0, MaxUint64]
56+
num.SetUint64(numerator) // range is [0, MaxUint64]
57+
denom.SetUint64(denominator) // range is [0, MaxUint64]
5858

5959
i.SetOne()
60-
numeratorAccum.SetUint64(uint64(factor)) // range is [0, MaxUint64]
60+
numeratorAccum.SetUint64(factor) // range is [0, MaxUint64]
6161
numeratorAccum.Mul(&numeratorAccum, &denom) // range is [0, MaxUint128]
6262

6363
maxOutput.Mul(&denom, max256Uint64) // range is [0, MaxUint128]

vms/evm/upgrades/acp226/acp226.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
// https://github.com/avalanche-foundation/ACPs/blob/main/ACPs/226-dynamic-minimum-block-times/README.md
66
package acp226
77

8-
import (
9-
"github.com/ava-labs/avalanchego/vms/evm/upgrades/common"
10-
)
8+
import "github.com/ava-labs/avalanchego/vms/evm/upgrades/common"
119

1210
const (
1311
// MinDelayMilliseconds (M) is the minimum block delay in milliseconds

vms/evm/upgrades/common/target_excess.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ func (p TargetExcessParams) DesiredTargetExcess(desiredTarget uint64) uint64 {
4646
// CalculateTarget calculates the target value using exponential formula:
4747
// Target = MinTarget * e^(Excess / TargetConversion)
4848
func (p TargetExcessParams) CalculateTarget(excess uint64) uint64 {
49-
return uint64(safemath.CalculateExponential(
49+
return safemath.CalculateExponential(
5050
p.MinTarget,
5151
excess,
5252
p.TargetConversion,
53-
))
53+
)
5454
}
5555

5656
// MulWithUpperBound multiplies two numbers and returns the result. If the

0 commit comments

Comments
 (0)