diff --git a/mobile_config/src/client/gateway_client.rs b/mobile_config/src/client/gateway_client.rs index e28309668..07141052c 100644 --- a/mobile_config/src/client/gateway_client.rs +++ b/mobile_config/src/client/gateway_client.rs @@ -54,6 +54,7 @@ pub trait GatewayInfoResolver: Clone + Send + Sync + 'static { async fn stream_gateways_info( &mut self, device_types: &[DeviceType], + min_updated_at: u64, ) -> Result; } @@ -74,7 +75,7 @@ impl GatewayInfoResolver for GatewayClient { }; request.signature = self.signing_key.sign(&request.encode_to_vec())?; tracing::debug!(pubkey = address.to_string(), "fetching gateway info"); - let response = match call_with_retry!(self.client.clone().info(request.clone())) { + let response = match call_with_retry!(self.client.clone().info_v2(request.clone())) { Ok(info_res) => { let response = info_res.into_inner(); response.verify(&self.config_pubkey)?; @@ -99,17 +100,19 @@ impl GatewayInfoResolver for GatewayClient { async fn stream_gateways_info( &mut self, device_types: &[DeviceType], + min_updated_at: u64, ) -> Result { - let mut req = mobile_config::GatewayInfoStreamReqV1 { + let mut req = mobile_config::GatewayInfoStreamReqV2 { batch_size: self.batch_size, device_types: device_types.iter().map(|v| DeviceType::into(*v)).collect(), signer: self.signing_key.public_key().into(), signature: vec![], + min_updated_at, }; req.signature = self.signing_key.sign(&req.encode_to_vec())?; tracing::debug!("fetching gateway info stream"); let pubkey = Arc::new(self.config_pubkey.clone()); - let res_stream = call_with_retry!(self.client.info_stream(req.clone()))? + let res_stream = call_with_retry!(self.client.info_stream_v2(req.clone()))? .into_inner() .filter_map(|res| async move { res.ok() }) .map(move |res| (res, pubkey.clone())) diff --git a/mobile_verifier/tests/integrations/speedtests.rs b/mobile_verifier/tests/integrations/speedtests.rs index d007639ef..8406c1316 100644 --- a/mobile_verifier/tests/integrations/speedtests.rs +++ b/mobile_verifier/tests/integrations/speedtests.rs @@ -38,6 +38,7 @@ impl GatewayInfoResolver for MockGatewayInfoResolver { async fn stream_gateways_info( &mut self, _device_types: &[MobileDeviceType], + _min_updated_at: u64, ) -> Result { todo!() }