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

Method check_message

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

Source from the content-addressed store, hash-verified

251}
252
253async fn check_message(
254 &self,
255 request: tonic::Request<pb::CheckmessageRequest>,
256) -> Result<tonic::Response<pb::CheckmessageResponse>, tonic::Status> {
257 let req = request.into_inner();
258 let req: requests::CheckmessageRequest = req.into();
259 debug!("Client asked for check_message");
260 trace!("check_message request: {:?}", req);
261 let mut rpc = ClnRpc::new(&self.rpc_path)
262 .await
263 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
264 let result = rpc.call(Request::CheckMessage(req))
265 .await
266 .map_err(|e| Status::new(
267 Code::Unknown,
268 format!("Error calling method CheckMessage: {:?}", e)))?;
269 match result {
270 Response::CheckMessage(r) => {
271 trace!("check_message response: {:?}", r);
272 Ok(tonic::Response::new(r.into()))
273 },
274 r => Err(Status::new(
275 Code::Internal,
276 format!(
277 "Unexpected result {:?} to method call CheckMessage",
278 r
279 )
280 )),
281 }
282
283}
284
285async fn close(
286 &self,

Callers

nothing calls this directly

Calls 2

to_stringMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected