Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacholme7 committed Feb 19, 2025
1 parent 4193e5b commit 6c5aa7f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions anchor/eth/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,15 +251,10 @@ impl SsvEventSyncer {
let mut start_block = std::cmp::max(deployment_block, last_processed_block + 1);

loop {
let current_block = match self.rpc_client.get_block_number().await {
Ok(block) => block,
Err(e) => {
error!(?e, "Failed to fetch block number");
return Err(ExecutionError::RpcError(format!(
"Failed to fetch block number: {e}"
)));
}
};
let current_block = self.rpc_client.get_block_number().await.map_err(|e| {
error!(?e, "Failed to fetch block number");
ExecutionError::RpcError(format!("Failed to fetch block number: {e}"))
})?;

// Basic verification
if current_block < FOLLOW_DISTANCE {
Expand Down

0 comments on commit 6c5aa7f

Please sign in to comment.