Skip to content

Commit

Permalink
Update examples/trusted-sync/src/main.rs
Browse files Browse the repository at this point in the history
Co-authored-by: clabby <[email protected]>
  • Loading branch information
refcell and clabby authored Jul 8, 2024
1 parent b69a3ec commit 6a68b19
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions examples/trusted-sync/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ async fn sync(cli: cli::Cli) -> Result<()> {
// If the start block from tip cli flag is specified, find the latest l2 block number
// and subtract the specified number of blocks to get the start block number.
if let Some(blocks) = cli.start_blocks_from_tip {
let latest = l2_provider.latest_block_number().await?;
start = latest.saturating_sub(blocks);
start = l2_provider.latest_block_number().await?.saturating_sub(blocks);
info!(target: LOG_TARGET, "Starting {} blocks from tip at L2 block number: {}", blocks, start);
}

Expand Down

0 comments on commit 6a68b19

Please sign in to comment.