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

Method auto_clean_once

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

Source from the content-addressed store, hash-verified

307 }
308
309 async fn auto_clean_once(
310 &self,
311 request: tonic::Request<pb::AutocleanonceRequest>,
312 ) -> Result<tonic::Response<pb::AutocleanonceResponse>, tonic::Status> {
313 let req = request.into_inner();
314 let req: requests::AutocleanonceRequest = req.into();
315 debug!("Client asked for auto_clean_once");
316 trace!("auto_clean_once request: {:?}", req);
317 let mut rpc = ClnRpc::new(&self.rpc_path)
318 .await
319 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
320 let result = rpc.call(Request::AutoCleanOnce(req))
321 .await
322 .map_err(|e| Status::new(
323 Code::Unknown,
324 format!("Error calling method AutoCleanOnce: {:?}", e)))?;
325 match result {
326 Response::AutoCleanOnce(r) => {
327 trace!("auto_clean_once response: {:?}", r);
328 Ok(tonic::Response::new(r.into()))
329 },
330 r => Err(Status::new(
331 Code::Internal,
332 format!(
333 "Unexpected result {:?} to method call AutoCleanOnce",
334 r
335 )
336 )),
337 }
338
339 }
340
341 async fn auto_clean_status(
342 &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