Skip to content

Commit 194b9c9

Browse files
committed
Merge branch '311-aggregator-wait-for-receipt-for-1-minute-if-not-bump-the-fee-v2' into test-aggregator-bump-fee
2 parents f40d017 + 7d8660b commit 194b9c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/utils/eth_client_utils.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ func BytesToQuorumThresholdPercentages(quorumThresholdPercentagesBytes []byte) e
5252
// Very basic algorithm to calculate the gasPrice bump based on the currentGasPrice and percentage.
5353
// It adds a the percentage to the current gas price.
5454
func CalculateGasPriceBump(currentGasPrice *big.Int, percentage int) *big.Int {
55-
percentageBump := new(big.Int).Div(big.NewInt(int64(percentage)), big.NewInt(100))
55+
percentageBump := big.NewInt(int64(percentage))
5656
bumpAmount := new(big.Int).Mul(currentGasPrice, percentageBump)
57+
bumpAmount = new(big.Int).Div(bumpAmount, big.NewInt(100))
5758
bumpedGasPrice := new(big.Int).Add(currentGasPrice, bumpAmount)
5859

5960
return bumpedGasPrice

0 commit comments

Comments
 (0)