MCPcopy Create free account
hub / github.com/ElementsProject/lightning / open_channel_update

Method open_channel_update

cln-grpc/src/server.rs:2648–2678  ·  view source on GitHub ↗
(
        &self,
        request: tonic::Request<pb::OpenchannelUpdateRequest>,
    )

Source from the content-addressed store, hash-verified

2646 }
2647
2648 async fn open_channel_update(
2649 &self,
2650 request: tonic::Request<pb::OpenchannelUpdateRequest>,
2651 ) -> Result<tonic::Response<pb::OpenchannelUpdateResponse>, tonic::Status> {
2652 let req = request.into_inner();
2653 let req: requests::OpenchannelUpdateRequest = req.try_into()?;
2654 debug!("Client asked for open_channel_update");
2655 trace!("open_channel_update request: {:?}", req);
2656 let mut rpc = ClnRpc::new(&self.rpc_path)
2657 .await
2658 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
2659 let result = rpc.call(Request::OpenChannelUpdate(req))
2660 .await
2661 .map_err(|e| Status::new(
2662 Code::Unknown,
2663 format!("Error calling method OpenChannelUpdate: {:?}", e)))?;
2664 match result {
2665 Response::OpenChannelUpdate(r) => {
2666 trace!("open_channel_update response: {:?}", r);
2667 Ok(tonic::Response::new(r.into()))
2668 },
2669 r => Err(Status::new(
2670 Code::Internal,
2671 format!(
2672 "Unexpected result {:?} to method call OpenChannelUpdate",
2673 r
2674 )
2675 )),
2676 }
2677
2678 }
2679
2680 async fn ping(
2681 &self,

Callers

nothing calls this directly

Calls 3

into_innerMethod · 0.80
to_stringMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected