From c0392ee26b9a42c3086755de33086b763f7e2295 Mon Sep 17 00:00:00 2001 From: Juan Munoz Date: Thu, 19 Dec 2024 12:29:15 -0300 Subject: [PATCH] use saturating sub --- core/node/da_clients/src/eigen/verifier.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/node/da_clients/src/eigen/verifier.rs b/core/node/da_clients/src/eigen/verifier.rs index 7750b99ba54c..ea9e25b118c9 100644 --- a/core/node/da_clients/src/eigen/verifier.rs +++ b/core/node/da_clients/src/eigen/verifier.rs @@ -296,7 +296,7 @@ impl Verifier { .as_u64(); let depth = self.cfg.settlement_layer_confirmation_depth.saturating_sub(1); - let block_to_return = latest - depth as u64; + let block_to_return = latest.saturating_sub(depth as u64); Ok(block_to_return) }