(
&self,
request: tonic::Request<pb::AddpsbtoutputRequest>,
)
| 275 | } |
| 276 | |
| 277 | async fn add_psbt_output( |
| 278 | &self, |
| 279 | request: tonic::Request<pb::AddpsbtoutputRequest>, |
| 280 | ) -> Result<tonic::Response<pb::AddpsbtoutputResponse>, tonic::Status> { |
| 281 | let req = request.into_inner(); |
| 282 | let req: requests::AddpsbtoutputRequest = req.into(); |
| 283 | debug!("Client asked for add_psbt_output"); |
| 284 | trace!("add_psbt_output request: {:?}", req); |
| 285 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 286 | .await |
| 287 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 288 | let result = rpc.call(Request::AddPsbtOutput(req)) |
| 289 | .await |
| 290 | .map_err(|e| Status::new( |
| 291 | Code::Unknown, |
| 292 | format!("Error calling method AddPsbtOutput: {:?}", e)))?; |
| 293 | match result { |
| 294 | Response::AddPsbtOutput(r) => { |
| 295 | trace!("add_psbt_output response: {:?}", r); |
| 296 | Ok(tonic::Response::new(r.into())) |
| 297 | }, |
| 298 | r => Err(Status::new( |
| 299 | Code::Internal, |
| 300 | format!( |
| 301 | "Unexpected result {:?} to method call AddPsbtOutput", |
| 302 | r |
| 303 | ) |
| 304 | )), |
| 305 | } |
| 306 | |
| 307 | } |
| 308 | |
| 309 | async fn auto_clean_once( |
| 310 | &self, |
nothing calls this directly
no test coverage detected