Skip to content

Commit

Permalink
feat(txpool): update max fee check in ValidateTransaction() (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed May 27, 2024
1 parent 8152c90 commit ef40d46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/txpool/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
if tx.GasFeeCapIntCmp(tx.GasTipCap()) < 0 {
return core.ErrTipAboveFeeCap
}
// CHANGE(taiko): ensure gasFeeCap fee cap larger than 0.01 GWei
if os.Getenv("TAIKO_TEST") == "" && tx.GasFeeCap().Cmp(new(big.Int).SetUint64(params.GWei/100)) < 0 {
return errors.New("max fee per gas is less than 0.01 GWei")
// CHANGE(taiko): ensure gasFeeCap fee cap larger than 0.
if os.Getenv("TAIKO_TEST") == "" && tx.GasFeeCap().Cmp(common.Big0) == 0 {
return errors.New("max fee per gas is 0")
}
// Make sure the transaction is signed properly
if _, err := types.Sender(signer, tx); err != nil {
Expand Down

0 comments on commit ef40d46

Please sign in to comment.