fn coerce_max_voter_weight(&self, max_voter_weight: u64) -> u64 {
        let deny_vote_weight = self.deny_vote_weight.unwrap_or(0);

        let max_option_vote_weight = self.options.iter().map(|o| o.vote_weight).max().unwrap();

        let total_vote_weight = max_option_vote_weight
            .checked_add(deny_vote_weight)
            .unwrap();

        max_voter_weight.max(total_vote_weight)
    }
/// Adjusts max voter weight to ensure it's not lower than total cast votes
Adjusts max voter weight to ensure it's not lower than total cast votes
Adjusts max voter weight to ensure it ' s not lower than total cast votes
fn coerce_max_voter_weight(&self, max_voter_weight: u64) -> u64 {
        let deny_vote_weight = self.deny_vote_weight.unwrap_or(0);
        let max_option_vote_weight = self.options.iter().map(|o| o.vote_weight).max().unwrap();
        let total_vote_weight = max_option_vote_weight
            .checked_add(deny_vote_weight)
            .unwrap();
        max_voter_weight.max(total_vote_weight)
    }
fn coerce_max_voter_weight ( & self , max_voter_weight : u64 ) -> u64 { let deny_vote_weight = self . deny_vote_weight . unwrap_or ( 0 ) ; let max_option_vote_weight = self . options . iter ( ) . map ( | o | o . vote_weight ) . max ( ) . unwrap ( ) ; let total_vote_weight = max_option_vote_weight . checked_add ( deny_vote_weight ) . unwrap ( ) ; max_voter_weight . max ( total_vote_weight ) }
Adjusts max voter weight to ensure it's not lower than total cast votes
Adjusts max voter weight to ensure it ' s not lower than total cast votes
&self
max_voter_weight
u64
&self
max_voter_weight
u64