Skip to content

Commit

Permalink
[R4R]-[txpool]fix: delete eip1559 fee check in txpool
Browse files Browse the repository at this point in the history
  • Loading branch information
Tri-stone committed Mar 13, 2024
1 parent 40ef473 commit a23e0d4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions core/txpool/txpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"time"

"github.com/ethereum/go-ethereum/common"
cmath "github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/common/prque"
"github.com/ethereum/go-ethereum/consensus/misc"
"github.com/ethereum/go-ethereum/core"
Expand Down Expand Up @@ -788,14 +787,14 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error {
}
}

if tx.Type() == types.DynamicFeeTxType {
// dynamicBaseFeeTxL1Cost gas used to cover L1 Cost for dynamic fee tx
effectiveGas := cmath.BigMin(new(big.Int).Add(tx.GasTipCap(), baseFee), tx.GasFeeCap())
dynamicFeeTxL1Cost := new(big.Int).Mul(effectiveGas, gasRemaining)
if l1Cost != nil && dynamicFeeTxL1Cost.Cmp(l1Cost) <= 0 {
return core.ErrInsufficientGasForL1Cost
}
}
//if tx.Type() == types.DynamicFeeTxType {
// // dynamicBaseFeeTxL1Cost gas used to cover L1 Cost for dynamic fee tx
// effectiveGas := cmath.BigMin(new(big.Int).Add(tx.GasTipCap(), baseFee), tx.GasFeeCap())
// dynamicFeeTxL1Cost := new(big.Int).Mul(effectiveGas, gasRemaining)
// if l1Cost != nil && dynamicFeeTxL1Cost.Cmp(l1Cost) <= 0 {
// return core.ErrInsufficientGasForL1Cost
// }
//}

return nil
}
Expand Down

0 comments on commit a23e0d4

Please sign in to comment.