Skip to content

Commit b0c0422

Browse files
committed
chore: clean static_selfdestruct_cost
1 parent 4d24789 commit b0c0422

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

crates/interpreter/src/gas/calc.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,12 @@ const fn frontier_sstore_cost(vals: &SStoreResult) -> u64 {
266266
/// Static gas cost for selfdestruct.
267267
#[inline]
268268
pub const fn static_selfdestruct_cost(spec_id: SpecId) -> u64 {
269-
let is_tangerine = spec_id.is_enabled_in(SpecId::TANGERINE);
270-
let mut gas = 0;
271-
272269
// EIP-150: Gas cost changes for IO-heavy operations
273-
gas += if is_tangerine { 5000 } else { 0 };
274-
275-
gas
270+
if spec_id.is_enabled_in(SpecId::TANGERINE) {
271+
5000
272+
} else {
273+
0
274+
}
276275
}
277276

278277
/// `SELFDESTRUCT` opcode cost calculation.

0 commit comments

Comments
 (0)