mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 06:23:47 +00:00
feat(txpool): update max fee check in ValidateTransaction() (#259)
This commit is contained in:
parent
8152c90c4f
commit
ef40d46c0e
1 changed files with 3 additions and 3 deletions
|
|
@ -98,9 +98,9 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
|
||||||
if tx.GasFeeCapIntCmp(tx.GasTipCap()) < 0 {
|
if tx.GasFeeCapIntCmp(tx.GasTipCap()) < 0 {
|
||||||
return core.ErrTipAboveFeeCap
|
return core.ErrTipAboveFeeCap
|
||||||
}
|
}
|
||||||
// CHANGE(taiko): ensure gasFeeCap fee cap larger than 0.01 GWei
|
// CHANGE(taiko): ensure gasFeeCap fee cap larger than 0.
|
||||||
if os.Getenv("TAIKO_TEST") == "" && tx.GasFeeCap().Cmp(new(big.Int).SetUint64(params.GWei/100)) < 0 {
|
if os.Getenv("TAIKO_TEST") == "" && tx.GasFeeCap().Cmp(common.Big0) == 0 {
|
||||||
return errors.New("max fee per gas is less than 0.01 GWei")
|
return errors.New("max fee per gas is 0")
|
||||||
}
|
}
|
||||||
// Make sure the transaction is signed properly
|
// Make sure the transaction is signed properly
|
||||||
if _, err := types.Sender(signer, tx); err != nil {
|
if _, err := types.Sender(signer, tx); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue