mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: set call trace gas limit with call inputs gas limit (#3214)
This commit is contained in:
@ -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),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user