Skip to content

Commit

Permalink
fix: clippy nits
Browse files Browse the repository at this point in the history
  • Loading branch information
refcell committed Jan 13, 2025
1 parent c6667a2 commit 1f011f9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/optimism/src/l1block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ pub const L1_BLOCK_CONTRACT: Address = address!("4200000000000000000000000000000
/// Calculates the L1 cost of a transaction.
pub fn calculate_tx_l1_cost(block_info: &L1BlockInfoTx, tx: &Bytes, spec_id: OpSpec) -> U256 {
if spec_id.is_enabled_in(OpSpecId::FJORD) {
return calculate_tx_l1_cost_fjord(
calculate_tx_l1_cost_fjord(
&tx[..],
block_info.l1_base_fee(),
block_info.l1_fee_scalar(),
block_info.blob_base_fee(),
block_info.blob_base_fee_scalar(),
);
)
} else if spec_id.is_enabled_in(OpSpecId::ECOTONE) {
if block_info.empty_scalars() {
return calculate_tx_l1_cost_bedrock_empty_scalars(
Expand All @@ -64,27 +64,27 @@ pub fn calculate_tx_l1_cost(block_info: &L1BlockInfoTx, tx: &Bytes, spec_id: OpS
block_info.l1_fee_scalar(),
);
}
return calculate_tx_l1_cost_ecotone(
calculate_tx_l1_cost_ecotone(
&tx[..],
block_info.l1_base_fee(),
block_info.l1_fee_scalar(),
block_info.blob_base_fee(),
block_info.blob_base_fee_scalar(),
);
)
} else if spec_id.is_enabled_in(OpSpecId::REGOLITH) {
return calculate_tx_l1_cost_regolith(
calculate_tx_l1_cost_regolith(
&tx[..],
block_info.l1_fee_overhead(),
block_info.l1_base_fee(),
block_info.l1_fee_scalar(),
);
)
} else {
return calculate_tx_l1_cost_bedrock(
calculate_tx_l1_cost_bedrock(
&tx[..],
block_info.l1_fee_overhead(),
block_info.l1_base_fee(),
block_info.l1_fee_scalar(),
);
)
}
}

Expand Down

0 comments on commit 1f011f9

Please sign in to comment.