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

Method open_channel_init

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

Source from the content-addressed store, hash-verified

2582 }
2583
2584 async fn open_channel_init(
2585 &self,
2586 request: tonic::Request<pb::OpenchannelInitRequest>,
2587 ) -> Result<tonic::Response<pb::OpenchannelInitResponse>, tonic::Status> {
2588 let req = request.into_inner();
2589 let req: requests::OpenchannelInitRequest = req.try_into()?;
2590 debug!("Client asked for open_channel_init");
2591 trace!("open_channel_init request: {:?}", req);
2592 let mut rpc = ClnRpc::new(&self.rpc_path)
2593 .await
2594 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
2595 let result = rpc.call(Request::OpenChannelInit(req))
2596 .await
2597 .map_err(|e| Status::new(
2598 Code::Unknown,
2599 format!("Error calling method OpenChannelInit: {:?}", e)))?;
2600 match result {
2601 Response::OpenChannelInit(r) => {
2602 trace!("open_channel_init response: {:?}", r);
2603 Ok(tonic::Response::new(r.into()))
2604 },
2605 r => Err(Status::new(
2606 Code::Internal,
2607 format!(
2608 "Unexpected result {:?} to method call OpenChannelInit",
2609 r
2610 )
2611 )),
2612 }
2613
2614 }
2615
2616 async fn open_channel_signed(
2617 &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