(
&self,
request: tonic::Request<pb::Fetchbip353Request>,
)
| 1941 | } |
| 1942 | |
| 1943 | async fn fetch_bip353( |
| 1944 | &self, |
| 1945 | request: tonic::Request<pb::Fetchbip353Request>, |
| 1946 | ) -> Result<tonic::Response<pb::Fetchbip353Response>, tonic::Status> { |
| 1947 | let req = request.into_inner(); |
| 1948 | let req: requests::Fetchbip353Request = req.try_into()?; |
| 1949 | debug!("Client asked for fetch_bip353"); |
| 1950 | trace!("fetch_bip353 request: {:?}", req); |
| 1951 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 1952 | .await |
| 1953 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 1954 | let result = rpc.call(Request::FetchBip353(req)) |
| 1955 | .await |
| 1956 | .map_err(|e| Status::new( |
| 1957 | Code::Unknown, |
| 1958 | format!("Error calling method FetchBip353: {:?}", e)))?; |
| 1959 | match result { |
| 1960 | Response::FetchBip353(r) => { |
| 1961 | trace!("fetch_bip353 response: {:?}", r); |
| 1962 | Ok(tonic::Response::new(r.into())) |
| 1963 | }, |
| 1964 | r => Err(Status::new( |
| 1965 | Code::Internal, |
| 1966 | format!( |
| 1967 | "Unexpected result {:?} to method call FetchBip353", |
| 1968 | r |
| 1969 | ) |
| 1970 | )), |
| 1971 | } |
| 1972 | |
| 1973 | } |
| 1974 | |
| 1975 | async fn fetch_invoice( |
| 1976 | &self, |
nothing calls this directly
no test coverage detected