(
&self,
request: tonic::Request<pb::DecodeRequest>,
)
| 1717 | } |
| 1718 | |
| 1719 | async fn decode( |
| 1720 | &self, |
| 1721 | request: tonic::Request<pb::DecodeRequest>, |
| 1722 | ) -> Result<tonic::Response<pb::DecodeResponse>, tonic::Status> { |
| 1723 | let req = request.into_inner(); |
| 1724 | let req: requests::DecodeRequest = req.try_into()?; |
| 1725 | debug!("Client asked for decode"); |
| 1726 | trace!("decode request: {:?}", req); |
| 1727 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 1728 | .await |
| 1729 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 1730 | let result = rpc.call(Request::Decode(req)) |
| 1731 | .await |
| 1732 | .map_err(|e| Status::new( |
| 1733 | Code::Unknown, |
| 1734 | format!("Error calling method Decode: {:?}", e)))?; |
| 1735 | match result { |
| 1736 | Response::Decode(r) => { |
| 1737 | trace!("decode response: {:?}", r); |
| 1738 | Ok(tonic::Response::new(r.into())) |
| 1739 | }, |
| 1740 | r => Err(Status::new( |
| 1741 | Code::Internal, |
| 1742 | format!( |
| 1743 | "Unexpected result {:?} to method call Decode", |
| 1744 | r |
| 1745 | ) |
| 1746 | )), |
| 1747 | } |
| 1748 | |
| 1749 | } |
| 1750 | |
| 1751 | async fn del_pay( |
| 1752 | &self, |
nothing calls this directly
no test coverage detected