Skip to content

Commit b27304a

Browse files
authored
Fix refund base fee (#1118)
1 parent 04301b0 commit b27304a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

frame/evm/src/runner/stack.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,20 @@ where
261261
_ => used_gas.into(),
262262
};
263263
let actual_fee = effective_gas.saturating_mul(total_fee_per_gas);
264+
let actual_base_fee = effective_gas.saturating_mul(base_fee);
264265

265266
log::debug!(
266267
target: "evm",
267-
"Execution {:?} [source: {:?}, value: {}, gas_limit: {}, actual_fee: {}, is_transactional: {}]",
268+
"Execution {:?} [source: {:?}, value: {}, gas_limit: {}, actual_fee: {}, used_gas: {}, effective_gas: {}, base_fee: {}, total_fee_per_gas: {}, is_transactional: {}]",
268269
reason,
269270
source,
270271
value,
271272
gas_limit,
272273
actual_fee,
274+
used_gas,
275+
effective_gas,
276+
base_fee,
277+
total_fee_per_gas,
273278
is_transactional
274279
);
275280
// The difference between initially withdrawn and the actual cost is refunded.
@@ -298,7 +303,7 @@ where
298303
// Actual fee after evm execution, including tip.
299304
actual_fee,
300305
// Base fee.
301-
executor.fee(base_fee),
306+
actual_base_fee,
302307
// Fee initially withdrawn.
303308
fee,
304309
);

0 commit comments

Comments
 (0)