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

Method list_datastore

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

Source from the content-addressed store, hash-verified

979 }
980
981 async fn list_datastore(
982 &self,
983 request: tonic::Request<pb::ListdatastoreRequest>,
984 ) -> Result<tonic::Response<pb::ListdatastoreResponse>, tonic::Status> {
985 let req = request.into_inner();
986 let req: requests::ListdatastoreRequest = req.try_into()?;
987 debug!("Client asked for list_datastore");
988 trace!("list_datastore request: {:?}", req);
989 let mut rpc = ClnRpc::new(&self.rpc_path)
990 .await
991 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
992 let result = rpc.call(Request::ListDatastore(req))
993 .await
994 .map_err(|e| Status::new(
995 Code::Unknown,
996 format!("Error calling method ListDatastore: {:?}", e)))?;
997 match result {
998 Response::ListDatastore(r) => {
999 trace!("list_datastore response: {:?}", r);
1000 Ok(tonic::Response::new(r.into()))
1001 },
1002 r => Err(Status::new(
1003 Code::Internal,
1004 format!(
1005 "Unexpected result {:?} to method call ListDatastore",
1006 r
1007 )
1008 )),
1009 }
1010
1011 }
1012
1013 async fn list_invoices(
1014 &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