(
&self,
request: tonic::Request<pb::DelinvoiceRequest>,
)
| 627 | } |
| 628 | |
| 629 | async fn del_invoice( |
| 630 | &self, |
| 631 | request: tonic::Request<pb::DelinvoiceRequest>, |
| 632 | ) -> Result<tonic::Response<pb::DelinvoiceResponse>, tonic::Status> { |
| 633 | let req = request.into_inner(); |
| 634 | let req: requests::DelinvoiceRequest = req.try_into()?; |
| 635 | debug!("Client asked for del_invoice"); |
| 636 | trace!("del_invoice request: {:?}", req); |
| 637 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 638 | .await |
| 639 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 640 | let result = rpc.call(Request::DelInvoice(req)) |
| 641 | .await |
| 642 | .map_err(|e| Status::new( |
| 643 | Code::Unknown, |
| 644 | format!("Error calling method DelInvoice: {:?}", e)))?; |
| 645 | match result { |
| 646 | Response::DelInvoice(r) => { |
| 647 | trace!("del_invoice response: {:?}", r); |
| 648 | Ok(tonic::Response::new(r.into())) |
| 649 | }, |
| 650 | r => Err(Status::new( |
| 651 | Code::Internal, |
| 652 | format!( |
| 653 | "Unexpected result {:?} to method call DelInvoice", |
| 654 | r |
| 655 | ) |
| 656 | )), |
| 657 | } |
| 658 | |
| 659 | } |
| 660 | |
| 661 | async fn dev_forget_channel( |
| 662 | &self, |
nothing calls this directly
no test coverage detected