We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3469101 commit 7d8660bCopy full SHA for 7d8660b
core/utils/eth_client_utils.go
@@ -51,8 +51,9 @@ func BytesToQuorumThresholdPercentages(quorumThresholdPercentagesBytes []byte) e
51
// Very basic algorithm to calculate the gasPrice bump based on the currentGasPrice and percentage.
52
// It adds a the percentage to the current gas price.
53
func CalculateGasPriceBump(currentGasPrice *big.Int, percentage int) *big.Int {
54
- percentageBump := new(big.Int).Div(big.NewInt(int64(percentage)), big.NewInt(100))
+ percentageBump := big.NewInt(int64(percentage))
55
bumpAmount := new(big.Int).Mul(currentGasPrice, percentageBump)
56
+ bumpAmount = new(big.Int).Div(bumpAmount, big.NewInt(100))
57
bumpedGasPrice := new(big.Int).Add(currentGasPrice, bumpAmount)
58
59
return bumpedGasPrice
0 commit comments