Skip to content

Commit

Permalink
Fix clippy on exit cache
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed Feb 23, 2024
1 parent 42a3867 commit ea28797
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion consensus/types/src/beacon_state/exit_cache.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use super::{BeaconStateError, ChainSpec, Epoch, Validator};
use safe_arith::SafeArith;
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;

Expand Down Expand Up @@ -44,7 +45,7 @@ impl ExitCache {
match exit_epoch.cmp(&self.max_exit_epoch) {
// Update churn for the current maximum epoch.
Ordering::Equal => {
self.max_exit_epoch_churn += 1;
self.max_exit_epoch_churn.safe_add_assign(1)?;
}
// Increase the max exit epoch, reset the churn to 1.
Ordering::Greater => {
Expand Down

0 comments on commit ea28797

Please sign in to comment.