Skip to content

Commit

Permalink
refactor(nearest): rounding strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
cong-or committed Feb 6, 2025
1 parent 19a5665 commit 01367e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chain-libs/chain-impl-mockchain/src/vote/tally.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl TallyResult {
let stake_with_gamma_scaling = stake.clone().pow(&gamma);

let weight = stake_with_gamma_scaling
.to_integer_round(Round::Down)
.to_integer_round(Round::Nearest)
.unwrap_or((Integer::from(weight.0), Ordering::Less))
.0
.to_u64()
Expand Down

0 comments on commit 01367e3

Please sign in to comment.