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

Method recover

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

Source from the content-addressed store, hash-verified

787 }
788
789 async fn recover(
790 &self,
791 request: tonic::Request<pb::RecoverRequest>,
792 ) -> Result<tonic::Response<pb::RecoverResponse>, tonic::Status> {
793 let req = request.into_inner();
794 let req: requests::RecoverRequest = req.try_into()?;
795 debug!("Client asked for recover");
796 trace!("recover request: {:?}", req);
797 let mut rpc = ClnRpc::new(&self.rpc_path)
798 .await
799 .map_err(|e| Status::new(Code::Internal, e.to_string()))?;
800 let result = rpc.call(Request::Recover(req))
801 .await
802 .map_err(|e| Status::new(
803 Code::Unknown,
804 format!("Error calling method Recover: {:?}", e)))?;
805 match result {
806 Response::Recover(r) => {
807 trace!("recover response: {:?}", r);
808 Ok(tonic::Response::new(r.into()))
809 },
810 r => Err(Status::new(
811 Code::Internal,
812 format!(
813 "Unexpected result {:?} to method call Recover",
814 r
815 )
816 )),
817 }
818
819 }
820
821 async fn recover_channel(
822 &self,

Callers 1

test_recover_commandFunction · 0.80

Calls 3

into_innerMethod · 0.80
to_stringMethod · 0.45
callMethod · 0.45

Tested by 1

test_recover_commandFunction · 0.64