(
&self,
request: tonic::Request<pb::SendcustommsgRequest>,
)
| 2840 | } |
| 2841 | |
| 2842 | async fn send_custom_msg( |
| 2843 | &self, |
| 2844 | request: tonic::Request<pb::SendcustommsgRequest>, |
| 2845 | ) -> Result<tonic::Response<pb::SendcustommsgResponse>, tonic::Status> { |
| 2846 | let req = request.into_inner(); |
| 2847 | let req: requests::SendcustommsgRequest = req.try_into()?; |
| 2848 | debug!("Client asked for send_custom_msg"); |
| 2849 | trace!("send_custom_msg request: {:?}", req); |
| 2850 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 2851 | .await |
| 2852 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 2853 | let result = rpc.call(Request::SendCustomMsg(req)) |
| 2854 | .await |
| 2855 | .map_err(|e| Status::new( |
| 2856 | Code::Unknown, |
| 2857 | format!("Error calling method SendCustomMsg: {:?}", e)))?; |
| 2858 | match result { |
| 2859 | Response::SendCustomMsg(r) => { |
| 2860 | trace!("send_custom_msg response: {:?}", r); |
| 2861 | Ok(tonic::Response::new(r.into())) |
| 2862 | }, |
| 2863 | r => Err(Status::new( |
| 2864 | Code::Internal, |
| 2865 | format!( |
| 2866 | "Unexpected result {:?} to method call SendCustomMsg", |
| 2867 | r |
| 2868 | ) |
| 2869 | )), |
| 2870 | } |
| 2871 | |
| 2872 | } |
| 2873 | |
| 2874 | async fn send_invoice( |
| 2875 | &self, |
nothing calls this directly
no test coverage detected