Skip to content

Commit

Permalink
fix: inverse if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
leruaa committed Dec 31, 2024
1 parent 67486f9 commit 19aaad1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions crates/revm/src/optimism/l1block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,7 @@ impl L1BlockInfo {
.then(|| db.storage(L1_BLOCK_CONTRACT, L1_OVERHEAD_SLOT))
.transpose()?;

if !spec_id.is_enabled_in(SpecId::ISTHMUS) {
// Pre-isthmus L1 block info
Ok(L1BlockInfo {
l1_base_fee,
l1_base_fee_scalar,
l1_blob_base_fee: Some(l1_blob_base_fee),
l1_blob_base_fee_scalar: Some(l1_blob_base_fee_scalar),
empty_ecotone_scalars,
l1_fee_overhead,
..Default::default()
})
} else {
if spec_id.is_enabled_in(SpecId::ISTHMUS) {
let operator_fee_scalars = db
.storage(L1_BLOCK_CONTRACT, OPERATOR_FEE_SCALARS_SLOT)?
.to_be_bytes::<32>();
Expand Down Expand Up @@ -181,6 +170,17 @@ impl L1BlockInfo {
operator_fee_scalar: Some(operator_fee_scalar),
operator_fee_constant: Some(operator_fee_constant),
})
} else {
// Pre-isthmus L1 block info
Ok(L1BlockInfo {
l1_base_fee,
l1_base_fee_scalar,
l1_blob_base_fee: Some(l1_blob_base_fee),
l1_blob_base_fee_scalar: Some(l1_blob_base_fee_scalar),
empty_ecotone_scalars,
l1_fee_overhead,
..Default::default()
})
}
}
}
Expand Down

0 comments on commit 19aaad1

Please sign in to comment.