fn process_new_epoch(&mut self, sender_id: &D::NodeId, epoch: D::Epoch) -> CpStep<Self> {
        let queue = match self.outgoing_queue.get_mut(sender_id) {
            None => return CpStep::<Self>::default(),
            Some(queue) => queue,
        };
        let earlier_keys: Vec<_> = queue
            .keys()
            .cloned()
            .take_while(|this_epoch| *this_epoch <= epoch)
            .collect();
        earlier_keys
            .into_iter()
            .filter_map(|key| queue.remove(&key))
            .flatten()
            .filter(|msg| !msg.is_obsolete(epoch))
            .map(|msg| Target::node(sender_id.clone()).message(Message::Algo(msg)))
            .into()
    }
/// Processes an announcement of a new epoch update received from a remote node.
Processes an announcement of a new epoch update received from a remote node.
Processes an announcement of a new epoch update received from a remote node .
fn process_new_epoch(&mut self, sender_id: &D::NodeId, epoch: D::Epoch) -> CpStep<Self> {
        let queue = match self.outgoing_queue.get_mut(sender_id) {
            None => return CpStep::<Self>::default(),
            Some(queue) => queue,
        };
        let earlier_keys: Vec<_> = queue
            .keys()
            .cloned()
            .take_while(|this_epoch| *this_epoch <= epoch)
            .collect();
        earlier_keys
            .into_iter()
            .filter_map(|key| queue.remove(&key))
            .flatten()
            .filter(|msg| !msg.is_obsolete(epoch))
            .map(|msg| Target::node(sender_id.clone()).message(Message::Algo(msg)))
            .into()
    }
fn process_new_epoch ( & mut self , sender_id : & D :: NodeId , epoch : D :: Epoch ) -> CpStep < Self > { let queue = match self . outgoing_queue . get_mut ( sender_id ) { None => return CpStep :: < Self > :: default ( ) , Some ( queue ) => queue , } ; let earlier_keys : Vec < _ > = queue . keys ( ) . cloned ( ) . take_while ( | this_epoch | * this_epoch <= epoch ) . collect ( ) ; earlier_keys . into_iter ( ) . filter_map ( | key | queue . remove ( & key ) ) . flatten ( ) . filter ( | msg | ! msg . is_obsolete ( epoch ) ) . map ( | msg | Target :: node ( sender_id . clone ( ) ) . message ( Message :: Algo ( msg ) ) ) . into ( ) }
Processes an announcement of a new epoch update received from a remote node.
Processes an announcement of a new epoch update received from a remote node .
&mut self
sender_id
&D::NodeId
epoch
D::Epoch
&mut self
sender_id
&D::NodeId
epoch
D::Epoch