Skip to content

Commit

Permalink
eth/tx: only enforce block gas limit on mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
q9f committed Dec 17, 2024
1 parent a1540e2 commit 3ff723b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/eth/tx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def validate_params(fields)
raise ParameterError, "Invalid signer nonce #{fields[:nonce]}!"
end
if fields[:gas_limit].nil? or
fields[:gas_limit] < DEFAULT_GAS_LIMIT or
(fields[:gas_limit] > BLOCK_GAS_LIMIT and fields[:chain_id] == Chain::ETHEREUM)
fields[:gas_limit] < DEFAULT_GAS_LIMIT or
(fields[:gas_limit] > BLOCK_GAS_LIMIT and fields[:chain_id] == Chain::ETHEREUM)
raise ParameterError, "Invalid gas limit #{fields[:gas_limit]}!"
end
unless fields[:value] >= 0
Expand Down

0 comments on commit 3ff723b

Please sign in to comment.