(
&self,
request: tonic::Request<pb::AddgossipRequest>,
)
| 243 | } |
| 244 | |
| 245 | async fn add_gossip( |
| 246 | &self, |
| 247 | request: tonic::Request<pb::AddgossipRequest>, |
| 248 | ) -> Result<tonic::Response<pb::AddgossipResponse>, tonic::Status> { |
| 249 | let req = request.into_inner(); |
| 250 | let req: requests::AddgossipRequest = req.into(); |
| 251 | debug!("Client asked for add_gossip"); |
| 252 | trace!("add_gossip request: {:?}", req); |
| 253 | let mut rpc = ClnRpc::new(&self.rpc_path) |
| 254 | .await |
| 255 | .map_err(|e| Status::new(Code::Internal, e.to_string()))?; |
| 256 | let result = rpc.call(Request::AddGossip(req)) |
| 257 | .await |
| 258 | .map_err(|e| Status::new( |
| 259 | Code::Unknown, |
| 260 | format!("Error calling method AddGossip: {:?}", e)))?; |
| 261 | match result { |
| 262 | Response::AddGossip(r) => { |
| 263 | trace!("add_gossip response: {:?}", r); |
| 264 | Ok(tonic::Response::new(r.into())) |
| 265 | }, |
| 266 | r => Err(Status::new( |
| 267 | Code::Internal, |
| 268 | format!( |
| 269 | "Unexpected result {:?} to method call AddGossip", |
| 270 | r |
| 271 | ) |
| 272 | )), |
| 273 | } |
| 274 | |
| 275 | } |
| 276 | |
| 277 | async fn add_psbt_output( |
| 278 | &self, |
nothing calls this directly
no test coverage detected