pub fn insert_vote(
        &mut self,
        vote: &Vote,
        validator_verifier: &ValidatorVerifier,
    ) -> VoteReceptionResult {
        if let Err(e) = self.replace_prev_vote(vote) {
            return e;
        }
        let vote_aggr_res = self.aggregate_qc(vote, validator_verifier);
        if let VoteReceptionResult::NewQuorumCertificate(_) = vote_aggr_res {
            return vote_aggr_res;
        }
        match self.aggregate_tc(vote, &validator_verifier) {
            Some(VoteReceptionResult::NewTimeoutCertificate(tc)) => {
                VoteReceptionResult::NewTimeoutCertificate(tc)
            }
            _ => vote_aggr_res,
        }
    }
/// Insert a vote and if the vote is valid, return a QuorumCertificate preferentially over a
/// TimeoutCertificate if either can can be formed
Insert a vote and if the vote is valid, return a QuorumCertificate preferentially over a
TimeoutCertificate if either can can be formed
Insert a vote and if the vote is valid return a QuorumCertificate preferentially over a TimeoutCertificate if either can can be formed
pub fn insert_vote(
        &mut self,
        vote: &Vote,
        validator_verifier: &ValidatorVerifier,
    ) -> VoteReceptionResult {
        if let Err(e) = self.replace_prev_vote(vote) {
            return e;
        }
        let vote_aggr_res = self.aggregate_qc(vote, validator_verifier);
        if let VoteReceptionResult::NewQuorumCertificate(_) = vote_aggr_res {
            return vote_aggr_res;
        }
        match self.aggregate_tc(vote, &validator_verifier) {
            Some(VoteReceptionResult::NewTimeoutCertificate(tc)) => {
                VoteReceptionResult::NewTimeoutCertificate(tc)
            }
            _ => vote_aggr_res,
        }
    }
pub fn insert_vote ( & mut self , vote : & Vote , validator_verifier : & ValidatorVerifier , ) -> VoteReceptionResult { if let Err ( e ) = self . replace_prev_vote ( vote ) { return e ; } let vote_aggr_res = self . aggregate_qc ( vote , validator_verifier ) ; if let VoteReceptionResult :: NewQuorumCertificate ( _ ) = vote_aggr_res { return vote_aggr_res ; } match self . aggregate_tc ( vote , & validator_verifier ) { Some ( VoteReceptionResult :: NewTimeoutCertificate ( tc ) ) => { VoteReceptionResult :: NewTimeoutCertificate ( tc ) } _ => vote_aggr_res , } }
Insert a vote and if the vote is valid, return a QuorumCertificate preferentially over a
TimeoutCertificate if either can can be formed
Insert a vote and if the vote is valid return a QuorumCertificate preferentially over a TimeoutCertificate if either can can be formed
&mut self
vote
&Vote
validator_verifier
&ValidatorVerifier
&mut self
vote
&Vote
validator_verifier
&ValidatorVerifier