(
&self,
request: tonic::Request<pb::XkeysendRequest>,
)
| 4920 | } |
| 4921 | |
| 4922 | async fn xkeysend( |
| 4923 | &self, |
| 4924 | request: tonic::Request<pb::XkeysendRequest>, |
| 4925 | ) -> Result<tonic::Response<pb::XkeysendResponse>, tonic::Status> { |
| 4926 | let req = request.into_inner(); |
| 4927 | let req: requests::XkeysendRequest = req.try_into()?; |
| 4928 | debug!("Client asked for xkeysend"); |
| 4929 | trace!("xkeysend request: {:?}", req); |
| 4930 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 4931 | .await |
| 4932 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 4933 | let result = rpc.call(Request::Xkeysend(req)) |
| 4934 | .await |
| 4935 | .map_err(|e| Status::new( |
| 4936 | Code::Unknown, |
| 4937 | format!("Error calling method Xkeysend: {:?}", e)))?; |
| 4938 | match result { |
| 4939 | Response::Xkeysend(r) => { |
| 4940 | trace!("xkeysend response: {:?}", r); |
| 4941 | Ok(tonic::Response::new(r.into())) |
| 4942 | }, |
| 4943 | r => Err(Status::new( |
| 4944 | Code::Internal, |
| 4945 | format!( |
| 4946 | "Unexpected result {:?} to method call Xkeysend", |
| 4947 | r |
| 4948 | ) |
| 4949 | )), |
| 4950 | } |
| 4951 | |
| 4952 | } |
| 4953 | |
| 4954 | async fn graceful( |
| 4955 | &self, |
nothing calls this directly
no test coverage detected