fn make_voter(&mut self, cfg: &mut Config, prs: &mut ProgressMap, id: u64) {
        info!("make a voter, id: {}", id);
        match prs.get_mut(&id) {
            Some(pr) => {
                pr.is_learner = false;
                cfg.learners.remove(&id);
                // TODO: why?
                cfg.learners_next.remove(&id);
                cfg.voters.incoming.insert(id);
            }
            None => {
                // TODO: why?
                self.init_progress(cfg, prs, id, false);
            }
        }
    }
// adds or promotes the given ID to be a voter in the incoming
adds or promotes the given ID to be a voter in the incoming
adds or promotes the given ID to be a voter in the incoming
fn make_voter(&mut self, cfg: &mut Config, prs: &mut ProgressMap, id: u64) {
        info!("make a voter, id: {}", id);
        match prs.get_mut(&id) {
            Some(pr) => {
                pr.is_learner = false;
                cfg.learners.remove(&id);
                // TODO: why?
                cfg.learners_next.remove(&id);
                cfg.voters.incoming.insert(id);
            }
            None => {
                // TODO: why?
                self.init_progress(cfg, prs, id, false);
            }
        }
    }
fn make_voter ( & mut self , cfg : & mut Config , prs : & mut ProgressMap , id : u64 ) { info ! ( " " id ) ; match prs . get_mut ( & id ) { Some ( pr ) => { pr . is_learner = false ; cfg . learners . remove ( & id ) ; // TODO: why? cfg . learners_next . remove ( & id ) ; cfg . voters . incoming . insert ( id ) ; } None => { // TODO: why? self . init_progress ( cfg , prs , id , false ) ; } } }
adds or promotes the given ID to be a voter in the incoming
adds or promotes the given ID to be a voter in the incoming
&mut self
cfg
&mut Config
prs
&mut ProgressMap
id
u64