fn upgrade_validator_state(
        &mut self,
        round: &HeightRound,
        validator: &Self::ValidatorId,
        state: State,
    ) -> bool {
        let validator_state = self.validator_state(round, validator);

        match validator_state {
            None => {
                self.set_validator_state(round, validator, state);

                true
            }

            Some(s) if state > s => {
                self.set_validator_state(round, validator, state);

                true
            }

            _ => false,
        }
    }
/// Upgrade a validator state, returning true if there was a change
Upgrade a validator state, returning true if there was a change
Upgrade a validator state returning true if there was a change
fn upgrade_validator_state(
        &mut self,
        round: &HeightRound,
        validator: &Self::ValidatorId,
        state: State,
    ) -> bool {
        let validator_state = self.validator_state(round, validator);
        match validator_state {
            None => {
                self.set_validator_state(round, validator, state);
                true
            }
            Some(s) if state > s => {
                self.set_validator_state(round, validator, state);
                true
            }
            _ => false,
        }
    }
fn upgrade_validator_state ( & mut self , round : & HeightRound , validator : & Self :: ValidatorId , state : State , ) -> bool { let validator_state = self . validator_state ( round , validator ) ; match validator_state { None => { self . set_validator_state ( round , validator , state ) ; true } Some ( s ) if state > s => { self . set_validator_state ( round , validator , state ) ; true } _ => false , } }
Upgrade a validator state, returning true if there was a change
Upgrade a validator state returning true if there was a change
&mut self
round
&HeightRound
validator
&Self::ValidatorId
state
State
&mut self
round
&HeightRound
validator
&Self::ValidatorId
state
State