Skip to content

Commit 2e96144

Browse files
committed
Add condition to disable gas refund for anchor transactions
1 parent 13c2272 commit 2e96144

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/revm/src/taiko/handler.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ pub fn reward_beneficiary<SPEC: Spec, DB: Database>(
117117
/// gas spend. (Before london it was 2th part of gas spend)
118118
#[inline]
119119
pub fn calculate_gas_refund<SPEC: Spec>(env: &Env, gas: &Gas) -> u64 {
120-
if env.cfg.is_gas_refund_disabled() {
120+
// no refund for anchor tx and gas refund disabled.
121+
if env.tx.taiko.is_anchor || env.cfg.is_gas_refund_disabled() {
121122
0
122123
} else {
123124
// EIP-3529: Reduction in refunds

0 commit comments

Comments
 (0)