fn call(&mut self, signed_ingress: SignedIngress) -> Self::Future {
        let gossip = Arc::clone(&self.gossip);
        let throttler = Arc::clone(&self.ingress_throttler);
        let node_id = self.node_id;
        let jh = self.rt_handle.spawn_blocking(move || {
            if throttler.read().unwrap().exceeds_threshold() {
                return Ok(Err(unavailable_error("Service Unavailable!")));
            }
            Ok(gossip.on_user_ingress(signed_ingress, node_id))
        });
        Box::pin(async move { jh.await.expect("Ingress ingestion task MUST NOT panic.") })
    }
/// The method is called when an ingress message is received.
The method is called when an ingress message is received.
The method is called when an ingress message is received .
fn call(&mut self, signed_ingress: SignedIngress) -> Self::Future {
        let gossip = Arc::clone(&self.gossip);
        let throttler = Arc::clone(&self.ingress_throttler);
        let node_id = self.node_id;
        let jh = self.rt_handle.spawn_blocking(move || {
            if throttler.read().unwrap().exceeds_threshold() {
                return Ok(Err(unavailable_error("Service Unavailable!")));
            }
            Ok(gossip.on_user_ingress(signed_ingress, node_id))
        });
        Box::pin(async move { jh.await.expect("Ingress ingestion task MUST NOT panic.") })
    }
fn call ( & mut self , signed_ingress : SignedIngress ) -> Self :: Future { let gossip = Arc :: clone ( & self . gossip ) ; let throttler = Arc :: clone ( & self . ingress_throttler ) ; let node_id = self . node_id ; let jh = self . rt_handle . spawn_blocking ( move | | { if throttler . read ( ) . unwrap ( ) . exceeds_threshold ( ) { return Ok ( Err ( unavailable_error ( " " ) ) ) ; } Ok ( gossip . on_user_ingress ( signed_ingress , node_id ) ) } ) ; Box :: pin ( async move { jh . await . expect ( " " ) } ) }
The method is called when an ingress message is received.
The method is called when an ingress message is received .
&mut self
signed_ingress
SignedIngress
&mut self
signed_ingress
SignedIngress