fix: set call trace gas limit with call inputs gas limit (#3214)

This commit is contained in:
Matthias Seitz
2023-06-17 16:07:05 +02:00
committed by GitHub
parent fe59bc8936
commit 547911ac19

View File

@ -130,6 +130,7 @@ impl TracingInspector {
value: U256,
kind: CallKind,
caller: Address,
gas_limit: u64,
maybe_precompile: Option<bool>,
) {
// This will only be true if the inspector is configured to exclude precompiles and the call
@ -154,6 +155,7 @@ impl TracingInspector {
caller,
last_call_return_value: self.last_call_return_data.clone(),
maybe_precompile,
gas_limit,
..Default::default()
},
));
@ -178,7 +180,6 @@ impl TracingInspector {
let trace = &mut self.traces.arena[trace_idx].trace;
trace.gas_used = gas.spend();
trace.gas_limit = gas.limit();
trace.status = status;
trace.success = matches!(status, return_ok!());
trace.output = output.clone();
@ -383,6 +384,7 @@ where
value,
inputs.context.scheme.into(),
from,
inputs.gas_limit,
maybe_precompile,
);
@ -421,6 +423,7 @@ where
inputs.value,
inputs.scheme.into(),
inputs.caller,
inputs.gas_limit,
Some(false),
);