Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions crates/interpreter/src/gas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod constants;

pub use calc::*;
pub use constants::*;
use revm_primitives::{Spec, SpecId::LONDON};

/// Represents the state of gas during execution.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -94,8 +93,8 @@ impl Gas {
///
/// Related to EIP-3529: Reduction in refunds
#[inline]
pub fn set_final_refund<SPEC: Spec>(&mut self) {
let max_refund_quotient = if SPEC::enabled(LONDON) { 5 } else { 2 };
pub fn set_final_refund(&mut self, is_london: bool) {
let max_refund_quotient = if is_london { 5 } else { 2 };
self.refunded = (self.refunded() as u64).min(self.spent() / max_refund_quotient) as i64;
}

Expand Down
Loading