async fn state_changed(&self, state_change: TransportStateChange) {
        let sender = {
            let send_map = self.peer_flows.transport.send_map.read().unwrap();
            send_map
                .get(&self.node_id)
                .expect("Self Node channel not setup")
                .clone()
        };
        sender
            .send(TransportNotification::TransportStateChange(state_change))
            .await
            .unwrap_or_else(|e| {
                // panic as we  will be blocking re-transmission requests at this point.
                panic!("Failed to dispatch transport state change {:?}", e)
            });
    }
/// The method changes the state of the P2P event handler.
The method changes the state of the P2P event handler.
The method changes the state of the P2P event handler .
async fn state_changed(&self, state_change: TransportStateChange) {
        let sender = {
            let send_map = self.peer_flows.transport.send_map.read().unwrap();
            send_map
                .get(&self.node_id)
                .expect("Self Node channel not setup")
                .clone()
        };
        sender
            .send(TransportNotification::TransportStateChange(state_change))
            .await
            .unwrap_or_else(|e| {
                // panic as we  will be blocking re-transmission requests at this point.
                panic!("Failed to dispatch transport state change {:?}", e)
            });
    }
async fn state_changed ( & self , state_change : TransportStateChange ) { let sender = { let send_map = self . peer_flows . transport . send_map . read ( ) . unwrap ( ) ; send_map . get ( & self . node_id ) . expect ( " " ) . clone ( ) } ; sender . send ( TransportNotification :: TransportStateChange ( state_change ) ) . await . unwrap_or_else ( | e | { // panic as we  will be blocking re-transmission requests at this point. panic ! ( " " e ) } ) ; }
The method changes the state of the P2P event handler.
The method changes the state of the P2P event handler .
&self
state_change
TransportStateChange
&self
state_change
TransportStateChange