Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Jan 27, 2024
1 parent b49f313 commit 99e71d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/revm/src/optimism/l1block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,14 @@ impl L1BlockInfo {
.as_ref(),
);

// Check if the L1 fee scalars are empty. If so, we use the Bedrock cost function. The L1 fee overhead is
// Check if the L1 fee scalars are empty. If so, we use the Bedrock cost function. The L1 fee overhead is
// only necessary if `empty_scalars` is true, as it was deprecated in Ecotone.
let empty_scalars = l1_blob_base_fee == U256::ZERO
&& l1_fee_scalars[BASE_FEE_SCALAR_OFFSET..BLOB_BASE_FEE_SCALAR_OFFSET + 4]
== EMPTY_SCALARS;
let l1_fee_overhead = empty_scalars.then(|| db.storage(L1_BLOCK_CONTRACT, L1_OVERHEAD_SLOT)).transpose()?;
let l1_fee_overhead = empty_scalars
.then(|| db.storage(L1_BLOCK_CONTRACT, L1_OVERHEAD_SLOT))
.transpose()?;

Ok(L1BlockInfo {
l1_base_fee,
Expand All @@ -104,7 +106,6 @@ impl L1BlockInfo {
l1_blob_base_fee_scalar: Some(l1_blob_base_fee_scalar),
empty_scalars,
l1_fee_overhead,
..Default::default()
})
}
}
Expand Down

0 comments on commit 99e71d2

Please sign in to comment.