fix: set tx gas limit not block gas limit (#5257)

This commit is contained in:
Matthias Seitz
2023-10-31 21:54:47 +01:00
committed by GitHub
parent d6e7fb11c6
commit 9bac558ef4

View File

@ -231,7 +231,7 @@ where
// if the provided gas limit is less than computed cap, use that // if the provided gas limit is less than computed cap, use that
let gas_limit = std::cmp::min(U256::from(env.tx.gas_limit), highest_gas_limit); let gas_limit = std::cmp::min(U256::from(env.tx.gas_limit), highest_gas_limit);
env.block.gas_limit = gas_limit; env.tx.gas_limit = gas_limit.saturating_to();
trace!(target: "rpc::eth::estimate", ?env, "Starting gas estimation"); trace!(target: "rpc::eth::estimate", ?env, "Starting gas estimation");