core: modify state transition

This commit is contained in:
Martin Holst Swende 2023-09-14 10:37:37 +02:00
parent 86bc2cdf33
commit ca5f59762a
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0

View file

@ -291,8 +291,8 @@ func (st *StateTransition) preCheck() error {
// Make sure that transaction gasFeeCap is greater than the baseFee (post london)
if st.evm.ChainConfig().IsLondon(st.evm.Context.BlockNumber) {
// Skip the checks if gas fields are zero and baseFee was explicitly disabled (eth_call)
if !st.evm.Config.NoBaseFee || msg.GasFeeCap.BitLen() > 0 || msg.GasTipCap.BitLen() > 0 {
// Skip the checks if explicitly disabled via (eth_call)
if !st.evm.Config.NoBaseFee {
if l := msg.GasFeeCap.BitLen(); l > 256 {
return fmt.Errorf("%w: address %v, maxFeePerGas bit length: %d", ErrFeeCapVeryHigh,
msg.From.Hex(), l)