fn handle_incoming(&mut self, msg: Bytes, _peer: Peer) {
        match deserialize(&msg) {
            Ok(msg) => {
                let mut rng = thread_rng();
                if let Some(ref mut key_gen) = self.key_gen {
                    match key_gen.handle_message(&mut rng, msg) {
                        Ok(list) => {
                            if !self.non_responsive {
                                for message in list {
                                    // Broadcast the reply messages right away
                                    let _ = self.broadcast(message);
                                }
                            }
                        }
                        Err(e) => trace!("Error: {:#?}", e),
                    }
                } else {
                    trace!("Error: No Keygen instance initiated")
                }
            }
            Err(e) => trace!("Error: {:#?}", e),
        }
    }
// Dispatches the incoming DKG message to the Key_Gen instance
Dispatches the incoming DKG message to the Key_Gen instance
Dispatches the incoming DKG message to the Key_Gen instance
fn handle_incoming(&mut self, msg: Bytes, _peer: Peer) {
        match deserialize(&msg) {
            Ok(msg) => {
                let mut rng = thread_rng();
                if let Some(ref mut key_gen) = self.key_gen {
                    match key_gen.handle_message(&mut rng, msg) {
                        Ok(list) => {
                            if !self.non_responsive {
                                for message in list {
                                    // Broadcast the reply messages right away
                                    let _ = self.broadcast(message);
                                }
                            }
                        }
                        Err(e) => trace!("Error: {:#?}", e),
                    }
                } else {
                    trace!("Error: No Keygen instance initiated")
                }
            }
            Err(e) => trace!("Error: {:#?}", e),
        }
    }
fn handle_incoming ( & mut self , msg : Bytes , _peer : Peer ) { match deserialize ( & msg ) { Ok ( msg ) => { let mut rng = thread_rng ( ) ; if let Some ( ref mut key_gen ) = self . key_gen { match key_gen . handle_message ( & mut rng , msg ) { Ok ( list ) => { if ! self . non_responsive { for message in list { // Broadcast the reply messages right away let _ = self . broadcast ( message ) ; } } } Err ( e ) => trace ! ( " " e ) , } } else { trace ! ( " " ) } } Err ( e ) => trace ! ( " " e ) , } }
Dispatches the incoming DKG message to the Key_Gen instance
Dispatches the incoming DKG message to the Key_Gen instance
&mut self
msg
Bytes
_peer
Peer