Skip to content

Commit 438a9fb

Browse files
fix(sender): make sure gas price is above baseFee (#1531)
Co-authored-by: 0xmountaintop <[email protected]> Co-authored-by: colin <[email protected]> Co-authored-by: colinlyguo <[email protected]>
1 parent 1c22307 commit 438a9fb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

common/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"runtime/debug"
66
)
77

8-
var tag = "v4.4.77"
8+
var tag = "v4.4.78"
99

1010
var commit = func() string {
1111
if info, ok := debug.ReadBuildInfo(); ok {

rollup/internal/controller/sender/sender.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ func (s *Sender) createReplacingTransaction(tx *gethTypes.Transaction, baseFee,
362362
originalGasPrice := tx.GasPrice()
363363
gasPrice := new(big.Int).Mul(originalGasPrice, escalateMultipleNum)
364364
gasPrice = new(big.Int).Div(gasPrice, escalateMultipleDen)
365+
baseFeeInt := new(big.Int).SetUint64(baseFee)
366+
if gasPrice.Cmp(baseFeeInt) < 0 {
367+
gasPrice = baseFeeInt
368+
}
365369
if gasPrice.Cmp(maxGasPrice) > 0 {
366370
gasPrice = maxGasPrice
367371
}

0 commit comments

Comments
 (0)