(
&self,
request: tonic::Request<pb::TxsendRequest>,
)
| 1621 | } |
| 1622 | |
| 1623 | async fn tx_send( |
| 1624 | &self, |
| 1625 | request: tonic::Request<pb::TxsendRequest>, |
| 1626 | ) -> Result<tonic::Response<pb::TxsendResponse>, tonic::Status> { |
| 1627 | let req = request.into_inner(); |
| 1628 | let req: requests::TxsendRequest = req.try_into()?; |
| 1629 | debug!("Client asked for tx_send"); |
| 1630 | trace!("tx_send request: {:?}", req); |
| 1631 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 1632 | .await |
| 1633 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 1634 | let result = rpc.call(Request::TxSend(req)) |
| 1635 | .await |
| 1636 | .map_err(|e| Status::new( |
| 1637 | Code::Unknown, |
| 1638 | format!("Error calling method TxSend: {:?}", e)))?; |
| 1639 | match result { |
| 1640 | Response::TxSend(r) => { |
| 1641 | trace!("tx_send response: {:?}", r); |
| 1642 | Ok(tonic::Response::new(r.into())) |
| 1643 | }, |
| 1644 | r => Err(Status::new( |
| 1645 | Code::Internal, |
| 1646 | format!( |
| 1647 | "Unexpected result {:?} to method call TxSend", |
| 1648 | r |
| 1649 | ) |
| 1650 | )), |
| 1651 | } |
| 1652 | |
| 1653 | } |
| 1654 | |
| 1655 | async fn list_peer_channels( |
| 1656 | &self, |
nothing calls this directly
no test coverage detected