From 9bac558ef4092759d7266d8dbb2f4b6fcffaf761 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 31 Oct 2023 21:54:47 +0100 Subject: [PATCH] fix: set tx gas limit not block gas limit (#5257) --- crates/rpc/rpc/src/eth/api/call.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rpc/rpc/src/eth/api/call.rs b/crates/rpc/rpc/src/eth/api/call.rs index e579ce37a8..f0a761d675 100644 --- a/crates/rpc/rpc/src/eth/api/call.rs +++ b/crates/rpc/rpc/src/eth/api/call.rs @@ -231,7 +231,7 @@ where // 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); - env.block.gas_limit = gas_limit; + env.tx.gas_limit = gas_limit.saturating_to(); trace!(target: "rpc::eth::estimate", ?env, "Starting gas estimation");