Skip to content

Commit

Permalink
use ceil instead of floor
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjoon-lee committed Sep 20, 2023
1 parent 00afc5b commit 83554c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion consensus-engine/src/overlay/threshold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn default_leader_super_majority_threshold() -> GenericFraction<u64> {
pub fn apply_threshold(size: usize, threshold: GenericFraction<u64>) -> usize {
// `threshold` is a tuple of (num, den) where `num/den` is the super majority threshold
(Fraction::from(size) * threshold)
.floor()
.ceil()
.to_usize()
.unwrap()
}
Expand Down

0 comments on commit 83554c8

Please sign in to comment.