Skip to content

Commit

Permalink
Fix max power in eth contract
Browse files Browse the repository at this point in the history
  • Loading branch information
danil-lashin committed Dec 2, 2021
1 parent fe959e7 commit 645f8c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchestrator/mhub2_utils/src/types/valsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::{
/// The total power in the Gravity bridge is normalized to u32 max every
/// time a validator set is created. This value of up to u32 max is then
/// stored in a u64 to prevent overflow during computation.
pub const TOTAL_GRAVITY_POWER: u64 = u32::MAX as u64;
pub const TOTAL_GRAVITY_POWER: u64 = u16::MAX as u64;

/// takes in an amount of power in the gravity bridge, returns a percentage of total
fn gravity_power_to_percent(input: u64) -> f32 {
Expand Down

0 comments on commit 645f8c1

Please sign in to comment.