Skip to content

Commit 7e01885

Browse files
committed
Use build_result_gas helper in system call gas handling
Replace manual ResultGas construction with the shared build_result_gas function for consistency with the main execution path.
1 parent be396f7 commit 7e01885

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

crates/handler/src/handler.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::{
22
evm::FrameTr,
3-
execution, post_execution,
3+
execution,
4+
post_execution::{self, build_result_gas},
45
pre_execution::{self, apply_eip7702_auth_list},
56
validation, EvmTr, FrameResult, ItemOrResult,
67
};
@@ -132,10 +133,7 @@ pub trait Handler {
132133
.and_then(|exec_result| {
133134
// System calls have no intrinsic gas; build ResultGas from frame result.
134135
let gas = exec_result.gas();
135-
let result_gas = ResultGas::default()
136-
.with_total_gas_spent(gas.total_gas_spent())
137-
.with_refunded(gas.refunded() as u64)
138-
.with_state_gas_spent(gas.state_gas_spent());
136+
let result_gas = build_result_gas(&gas, init_and_floor_gas);
139137
self.execution_result(evm, exec_result, result_gas)
140138
}) {
141139
out @ Ok(_) => out,

0 commit comments

Comments
 (0)