(
&self,
request: tonic::Request<pb::TxprepareRequest>,
)
| 1589 | } |
| 1590 | |
| 1591 | async fn tx_prepare( |
| 1592 | &self, |
| 1593 | request: tonic::Request<pb::TxprepareRequest>, |
| 1594 | ) -> Result<tonic::Response<pb::TxprepareResponse>, tonic::Status> { |
| 1595 | let req = request.into_inner(); |
| 1596 | let req: requests::TxprepareRequest = req.try_into()?; |
| 1597 | debug!("Client asked for tx_prepare"); |
| 1598 | trace!("tx_prepare request: {:?}", req); |
| 1599 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 1600 | .await |
| 1601 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 1602 | let result = rpc.call(Request::TxPrepare(req)) |
| 1603 | .await |
| 1604 | .map_err(|e| Status::new( |
| 1605 | Code::Unknown, |
| 1606 | format!("Error calling method TxPrepare: {:?}", e)))?; |
| 1607 | match result { |
| 1608 | Response::TxPrepare(r) => { |
| 1609 | trace!("tx_prepare response: {:?}", r); |
| 1610 | Ok(tonic::Response::new(r.into())) |
| 1611 | }, |
| 1612 | r => Err(Status::new( |
| 1613 | Code::Internal, |
| 1614 | format!( |
| 1615 | "Unexpected result {:?} to method call TxPrepare", |
| 1616 | r |
| 1617 | ) |
| 1618 | )), |
| 1619 | } |
| 1620 | |
| 1621 | } |
| 1622 | |
| 1623 | async fn tx_send( |
| 1624 | &self, |
nothing calls this directly
no test coverage detected