Skip to content

Commit

Permalink
Add condition to disable gas refund for anchor transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
johntaiko committed Dec 9, 2023
1 parent 13c2272 commit 2e96144
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/revm/src/taiko/handler.rs
Expand Up @@ -117,7 +117,8 @@ pub fn reward_beneficiary<SPEC: Spec, DB: Database>(
/// gas spend. (Before london it was 2th part of gas spend)
#[inline]
pub fn calculate_gas_refund<SPEC: Spec>(env: &Env, gas: &Gas) -> u64 {
if env.cfg.is_gas_refund_disabled() {
// no refund for anchor tx and gas refund disabled.
if env.tx.taiko.is_anchor || env.cfg.is_gas_refund_disabled() {
0
} else {
// EIP-3529: Reduction in refunds
Expand Down

0 comments on commit 2e96144

Please sign in to comment.