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

Method splice_init

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

Source from the content-addressed store, hash-verified

3064 }
3065
3066 async fn splice_init(
3067 &self,
3068 request: tonic::Request<pb::SpliceInitRequest>,
3069 ) -> Result<tonic::Response<pb::SpliceInitResponse>, tonic::Status> {
3070 let req = request.into_inner();
3071 let req: requests::SpliceInitRequest = req.try_into()?;
3072 debug!("Client asked for splice_init");
3073 trace!("splice_init request: {:?}", req);
3074 let mut rpc = ClnRpc::new(&self.rpc_path)
3075 .await
3076 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
3077 let result = rpc.call(Request::SpliceInit(req))
3078 .await
3079 .map_err(|e| Status::new(
3080 Code::Unknown,
3081 format!("Error calling method SpliceInit: {:?}", e)))?;
3082 match result {
3083 Response::SpliceInit(r) => {
3084 trace!("splice_init response: {:?}", r);
3085 Ok(tonic::Response::new(r.into()))
3086 },
3087 r => Err(Status::new(
3088 Code::Internal,
3089 format!(
3090 "Unexpected result {:?} to method call SpliceInit",
3091 r
3092 )
3093 )),
3094 }
3095
3096 }
3097
3098 async fn splice_signed(
3099 &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