From bb3e9e12d27e7f6e33adea62fa4e2c3307aa81c1 Mon Sep 17 00:00:00 2001 From: dapplion <35266934+dapplion@users.noreply.github.com> Date: Wed, 25 Mar 2026 20:38:15 -0500 Subject: [PATCH] Fix arithmetic lint in committee_cache (saturating_sub) --- consensus/types/src/state/committee_cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consensus/types/src/state/committee_cache.rs b/consensus/types/src/state/committee_cache.rs index 4a28f3c689..e76b0d2421 100644 --- a/consensus/types/src/state/committee_cache.rs +++ b/consensus/types/src/state/committee_cache.rs @@ -332,7 +332,7 @@ impl CommitteeCache { self.shuffling_positions .get(validator_index)? .0 - .map(|p| p.get() - 1) + .map(|p| p.get().saturating_sub(1)) } }