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

Method get_log

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

Source from the content-addressed store, hash-verified

2165 }
2166
2167 async fn get_log(
2168 &self,
2169 request: tonic::Request<pb::GetlogRequest>,
2170 ) -> Result<tonic::Response<pb::GetlogResponse>, tonic::Status> {
2171 let req = request.into_inner();
2172 let req: requests::GetlogRequest = req.try_into()?;
2173 debug!("Client asked for get_log");
2174 trace!("get_log request: {:?}", req);
2175 let mut rpc = ClnRpc::new(&self.rpc_path)
2176 .await
2177 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
2178 let result = rpc.call(Request::GetLog(req))
2179 .await
2180 .map_err(|e| Status::new(
2181 Code::Unknown,
2182 format!("Error calling method GetLog: {:?}", e)))?;
2183 match result {
2184 Response::GetLog(r) => {
2185 trace!("get_log response: {:?}", r);
2186 Ok(tonic::Response::new(r.into()))
2187 },
2188 r => Err(Status::new(
2189 Code::Internal,
2190 format!(
2191 "Unexpected result {:?} to method call GetLog",
2192 r
2193 )
2194 )),
2195 }
2196
2197 }
2198
2199 async fn funder_update(
2200 &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