Skip to content

Commit

Permalink
fix(cost-estimator): max
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Dec 4, 2024
1 parent aca734c commit 91e1606
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/host/src/block_range.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{cmp::min, time::Duration};
use std::{cmp::max, time::Duration};

use crate::fetcher::OPSuccinctDataFetcher;
use alloy_eips::BlockId;
Expand Down Expand Up @@ -31,7 +31,7 @@ pub async fn get_validated_block_range(
// If start block not provided, use end block - default_range
let l2_start_block = match start {
Some(start) => start,
None => min(1, l2_end_block.saturating_sub(default_range)),
None => max(1, l2_end_block.saturating_sub(default_range)),
};

if l2_start_block >= l2_end_block {
Expand Down

0 comments on commit 91e1606

Please sign in to comment.