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

Method check_message

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

Source from the content-addressed store, hash-verified

371 }
372
373 async fn check_message(
374 &self,
375 request: tonic::Request<pb::CheckmessageRequest>,
376 ) -> Result<tonic::Response<pb::CheckmessageResponse>, tonic::Status> {
377 let req = request.into_inner();
378 let req: requests::CheckmessageRequest = req.into();
379 debug!("Client asked for check_message");
380 trace!("check_message request: {:?}", req);
381 let mut rpc = ClnRpc::new(&self.rpc_path)
382 .await
383 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
384 let result = rpc.call(Request::CheckMessage(req))
385 .await
386 .map_err(|e| Status::new(
387 Code::Unknown,
388 format!("Error calling method CheckMessage: {:?}", e)))?;
389 match result {
390 Response::CheckMessage(r) => {
391 trace!("check_message response: {:?}", r);
392 Ok(tonic::Response::new(r.into()))
393 },
394 r => Err(Status::new(
395 Code::Internal,
396 format!(
397 "Unexpected result {:?} to method call CheckMessage",
398 r
399 )
400 )),
401 }
402
403 }
404
405 async fn close(
406 &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