Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
86667 committed Dec 19, 2024
1 parent 174a70b commit 0999deb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions zilliqa/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2612,8 +2612,7 @@ impl Consensus {
// in other words, the current view is always at least 2 views ahead of the highQC's view
// i.e. to get `consensus_timeout_ms * 2^0` we have to subtract 2 from `view_difference`
let consensus_timeout = self.config.consensus.consensus_timeout.as_millis() as f32;
(consensus_timeout * f32::from(1.5).powi(view_difference.saturating_sub(2) as i32)).floor()
as u64
(consensus_timeout * (1.5f32).powi(view_difference.saturating_sub(2) as i32)).floor() as u64
}

/// Find minimum number of views which could have passed by in the given time difference.
Expand All @@ -2627,7 +2626,7 @@ impl Consensus {
let mut views = 0;
let mut total = 0.0;
loop {
total += f32::from(1.5).powi(views);
total += (1.5f32).powi(views);
if total > normalised_time_difference {
break;
}
Expand Down

0 comments on commit 0999deb

Please sign in to comment.