Skip to content

Commit

Permalink
remove double multiplication (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur authored Apr 29, 2024
1 parent 954cd76 commit 55e3fae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chainio/txmgr/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
)

var (
// 5 gwei in case the backend does not support eth_maxPriorityFeePerGas (no idea if/when this ever happens..)
// FallbackGasTipCap 5 gwei in case the backend does not support eth_maxPriorityFeePerGas (no idea if/when this ever happens..)
FallbackGasTipCap = big.NewInt(5_000_000_000)
// 1.20x gas limit multiplier. This is arbitrary but should be safe for most cases
// FallbackGasLimitMultiplier 1.20x gas limit multiplier. This is arbitrary but should be safe for most cases
FallbackGasLimitMultiplier = 1.20
)

Expand Down Expand Up @@ -201,7 +201,7 @@ func (m *SimpleTxManager) estimateGasAndNonce(ctx context.Context, tx *types.Tra
GasFeeCap: gasFeeCap,
Data: tx.Data(),
Value: tx.Value(),
Gas: uint64(float64(gasLimit) * m.gasLimitMultiplier),
Gas: gasLimit,
Nonce: tx.Nonce(), // We are not doing any nonce management for now but we probably should later for more robustness
}

Expand Down

0 comments on commit 55e3fae

Please sign in to comment.