(
&self,
request: tonic::Request<pb::WaitblockheightRequest>,
)
| 3320 | } |
| 3321 | |
| 3322 | async fn wait_block_height( |
| 3323 | &self, |
| 3324 | request: tonic::Request<pb::WaitblockheightRequest>, |
| 3325 | ) -> Result<tonic::Response<pb::WaitblockheightResponse>, tonic::Status> { |
| 3326 | let req = request.into_inner(); |
| 3327 | let req: requests::WaitblockheightRequest = req.try_into()?; |
| 3328 | debug!("Client asked for wait_block_height"); |
| 3329 | trace!("wait_block_height request: {:?}", req); |
| 3330 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 3331 | .await |
| 3332 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 3333 | let result = rpc.call(Request::WaitBlockHeight(req)) |
| 3334 | .await |
| 3335 | .map_err(|e| Status::new( |
| 3336 | Code::Unknown, |
| 3337 | format!("Error calling method WaitBlockHeight: {:?}", e)))?; |
| 3338 | match result { |
| 3339 | Response::WaitBlockHeight(r) => { |
| 3340 | trace!("wait_block_height response: {:?}", r); |
| 3341 | Ok(tonic::Response::new(r.into())) |
| 3342 | }, |
| 3343 | r => Err(Status::new( |
| 3344 | Code::Internal, |
| 3345 | format!( |
| 3346 | "Unexpected result {:?} to method call WaitBlockHeight", |
| 3347 | r |
| 3348 | ) |
| 3349 | )), |
| 3350 | } |
| 3351 | |
| 3352 | } |
| 3353 | |
| 3354 | async fn wait( |
| 3355 | &self, |
nothing calls this directly
no test coverage detected