async fn handle_reply(&mut self, reply_surb: ReplySURB, data: Vec<u8>) -> Option<RealMessage> {
        let topology_permit = self.topology_access.get_read_permit().await;
        let topology = match topology_permit.try_get_valid_topology_ref(&self.ack_recipient, None) {
            Some(topology_ref) => topology_ref,
            None => {
                warn!("Could not process the message - the network topology is invalid");
                return None;
            }
        };

        match self
            .message_preparer
            .prepare_reply_for_use(data, reply_surb, topology, &self.ack_key)
            .await
        {
            Ok((mix_packet, reply_id)) => {
                // TODO: later probably write pending ack here
                // and deal with them....
                // ... somehow
                Some(RealMessage::new(mix_packet, reply_id))
            }
            Err(err) => {
                // TODO: should we have some mechanism to indicate to the user that the `reply_surb`
                // could be reused since technically it wasn't used up here?
                warn!("failed to deal with received reply surb - {:?}", err);
                None
            }
        }
    }
// we require topology for replies to generate surb_acks
we require topology for replies to generate surb_acks
we require topology for replies to generate surb_acks
async fn handle_reply(&mut self, reply_surb: ReplySURB, data: Vec<u8>) -> Option<RealMessage> {
        let topology_permit = self.topology_access.get_read_permit().await;
        let topology = match topology_permit.try_get_valid_topology_ref(&self.ack_recipient, None) {
            Some(topology_ref) => topology_ref,
            None => {
                warn!("Could not process the message - the network topology is invalid");
                return None;
            }
        };
        match self
            .message_preparer
            .prepare_reply_for_use(data, reply_surb, topology, &self.ack_key)
            .await
        {
            Ok((mix_packet, reply_id)) => {
                // TODO: later probably write pending ack here
                // and deal with them....
                // ... somehow
                Some(RealMessage::new(mix_packet, reply_id))
            }
            Err(err) => {
                // TODO: should we have some mechanism to indicate to the user that the `reply_surb`
                // could be reused since technically it wasn't used up here?
                warn!("failed to deal with received reply surb - {:?}", err);
                None
            }
        }
    }
async fn handle_reply ( & mut self , reply_surb : ReplySURB , data : Vec < u8 > ) -> Option < RealMessage > { let topology_permit = self . topology_access . get_read_permit ( ) . await ; let topology = match topology_permit . try_get_valid_topology_ref ( & self . ack_recipient , None ) { Some ( topology_ref ) => topology_ref , None => { warn ! ( " " ) ; return None ; } } ; match self . message_preparer . prepare_reply_for_use ( data , reply_surb , topology , & self . ack_key ) . await { Ok ( ( mix_packet , reply_id ) ) => { // TODO: later probably write pending ack here // and deal with them.... // ... somehow Some ( RealMessage :: new ( mix_packet , reply_id ) ) } Err ( err ) => { // TODO: should we have some mechanism to indicate to the user that the `reply_surb` // could be reused since technically it wasn't used up here? warn ! ( " " err ) ; None } } }
we require topology for replies to generate surb_acks
we require topology for replies to generate surb_acks
&mut self
reply_surb
ReplySURB
data
Vec<u8>