From e690fcc043c1b7117f1ddc28f721256a97b8076b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 7 Nov 2024 13:47:57 +0100 Subject: [PATCH] calculating real gas used for execute_code_as_system to prevent overflows. --- crates/ethcore/src/machine/impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ethcore/src/machine/impls.rs b/crates/ethcore/src/machine/impls.rs index 60ab70822..fa4ba2d3b 100644 --- a/crates/ethcore/src/machine/impls.rs +++ b/crates/ethcore/src/machine/impls.rs @@ -212,7 +212,7 @@ impl EthereumMachine { let output = res.return_data.to_vec(); let logs = substate.logs.clone(); - let gas_used = gas; + let gas_used = gas - res.gas_left; let mut log_bloom = Bloom::zero(); //log_bloom.accrue(logs);