(
&self,
request: tonic::Request<pb::ListhtlcsRequest>,
)
| 2390 | } |
| 2391 | |
| 2392 | async fn list_htlcs( |
| 2393 | &self, |
| 2394 | request: tonic::Request<pb::ListhtlcsRequest>, |
| 2395 | ) -> Result<tonic::Response<pb::ListhtlcsResponse>, tonic::Status> { |
| 2396 | let req = request.into_inner(); |
| 2397 | let req: requests::ListhtlcsRequest = req.try_into()?; |
| 2398 | debug!("Client asked for list_htlcs"); |
| 2399 | trace!("list_htlcs request: {:?}", req); |
| 2400 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 2401 | .await |
| 2402 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 2403 | let result = rpc.call(Request::ListHtlcs(req)) |
| 2404 | .await |
| 2405 | .map_err(|e| Status::new( |
| 2406 | Code::Unknown, |
| 2407 | format!("Error calling method ListHtlcs: {:?}", e)))?; |
| 2408 | match result { |
| 2409 | Response::ListHtlcs(r) => { |
| 2410 | trace!("list_htlcs response: {:?}", r); |
| 2411 | Ok(tonic::Response::new(r.into())) |
| 2412 | }, |
| 2413 | r => Err(Status::new( |
| 2414 | Code::Internal, |
| 2415 | format!( |
| 2416 | "Unexpected result {:?} to method call ListHtlcs", |
| 2417 | r |
| 2418 | ) |
| 2419 | )), |
| 2420 | } |
| 2421 | |
| 2422 | } |
| 2423 | |
| 2424 | async fn multi_fund_channel( |
| 2425 | &self, |
nothing calls this directly
no test coverage detected