Exemple #1
0
        internal void SendSolution(Solution activeSolution, List <uint> sols)
        {
            try
            {
                SubmitParams pow = new SubmitParams()
                {
                    height = activeSolution.height, nonce = activeSolution.nonce, pow = sols
                };
                GrinRpcRequest request = new GrinRpcRequest(GrinCommand.Solution);
                request.SetParams(pow);

                if (GrinSend <GrinRpcRequest>(request))
                {
                }
            }
            catch { }
        }
Exemple #2
0
        public void SendLogin(string username, string password)
        {
            try
            {
                LoginParams lp = new LoginParams()
                {
                    login = username, pass = password
                };
                GrinRpcRequest request = new GrinRpcRequest(GrinCommand.Login);
                request.SetParams(lp);

                if (GrinSend <GrinRpcRequest>(request))
                {
                    Console.WriteLine("Login sent.");
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }