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

Method del_datastore

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

Source from the content-addressed store, hash-verified

595 }
596
597 async fn del_datastore(
598 &self,
599 request: tonic::Request<pb::DeldatastoreRequest>,
600 ) -> Result<tonic::Response<pb::DeldatastoreResponse>, tonic::Status> {
601 let req = request.into_inner();
602 let req: requests::DeldatastoreRequest = req.try_into()?;
603 debug!("Client asked for del_datastore");
604 trace!("del_datastore request: {:?}", req);
605 let mut rpc = ClnRpc::new(&self.rpc_path)
606 .await
607 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
608 let result = rpc.call(Request::DelDatastore(req))
609 .await
610 .map_err(|e| Status::new(
611 Code::Unknown,
612 format!("Error calling method DelDatastore: {:?}", e)))?;
613 match result {
614 Response::DelDatastore(r) => {
615 trace!("del_datastore response: {:?}", r);
616 Ok(tonic::Response::new(r.into()))
617 },
618 r => Err(Status::new(
619 Code::Internal,
620 format!(
621 "Unexpected result {:?} to method call DelDatastore",
622 r
623 )
624 )),
625 }
626
627 }
628
629 async fn del_invoice(
630 &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