Skip to content

Commit 01367e3

Browse files
committed
refactor(nearest): rounding strategy
1 parent 19a5665 commit 01367e3

File tree

1 file changed

+1
-1
lines changed
  • src/chain-libs/chain-impl-mockchain/src/vote

1 file changed

+1
-1
lines changed

src/chain-libs/chain-impl-mockchain/src/vote/tally.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl TallyResult {
203203
let stake_with_gamma_scaling = stake.clone().pow(&gamma);
204204

205205
let weight = stake_with_gamma_scaling
206-
.to_integer_round(Round::Down)
206+
.to_integer_round(Round::Nearest)
207207
.unwrap_or((Integer::from(weight.0), Ordering::Less))
208208
.0
209209
.to_u64()

0 commit comments

Comments
 (0)