Skip to content

Commit

Permalink
simplify get_context_block
Browse files Browse the repository at this point in the history
  • Loading branch information
juan518munoz committed Dec 17, 2024
1 parent 3a962d7 commit c67eb25
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/node/da_clients/src/eigen/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,9 @@ impl Verifier {
.map_err(|_| VerificationError::ServiceManagerError)?
.as_u64();

if self.cfg.settlement_layer_confirmation_depth == 0 {
return Ok(latest);
}
Ok(latest - (self.cfg.settlement_layer_confirmation_depth as u64 - 1))
let depth = self.cfg.settlement_layer_confirmation_depth.saturating_sub(1);
let block_to_return = latest - depth as u64;
Ok(block_to_return)
}

async fn call_batch_id_to_metadata_hash(
Expand Down

0 comments on commit c67eb25

Please sign in to comment.