Exemple #1
0
        static void Mainasdfasdfasdf(string[] args)
        {
            var serversList = new List <StratumConnection>
            {
                //groestl - StratumConnection.Parse("hub.miningpoolhub.com,12004,wchasik,home,x");
                //myr-gr - StratumConnection.Parse("hub.miningpoolhub.com,12005,wchasik,home,x");

                StratumConnection.Parse(AlgoNiceHashEnum.X11, "hub.miningpoolhub.com,12007,wchasik,home,x"),
                StratumConnection.Parse(AlgoNiceHashEnum.X13, "hub.miningpoolhub.com,12008,wchasik,home,x"),
                StratumConnection.Parse(AlgoNiceHashEnum.X15, "hub.miningpoolhub.com,12009,wchasik,home,x"),
                StratumConnection.Parse(AlgoNiceHashEnum.NeoScrypt, "hub.miningpoolhub.com,12012,wchasik,home,x"),
                StratumConnection.Parse(AlgoNiceHashEnum.Qubit, "hub.miningpoolhub.com,12014,wchasik,home,x"),
                StratumConnection.Parse(AlgoNiceHashEnum.Quark, "hub.miningpoolhub.com,12015,wchasik,home,x"),
                // skein - StratumConnection.Parse("hub.miningpoolhub.com,12016,wchasik,home,x");
                StratumConnection.Parse(AlgoNiceHashEnum.Lyra2REv2, "hub.miningpoolhub.com,12018,wchasik,home,x"),
                // vanilla - StratumConnection.Parse("hub.miningpoolhub.com,12019,wchasik,home,x");
                StratumConnection.Parse(AlgoNiceHashEnum.DaggerHashimoto, "europe.ethash-hub.miningpoolhub.com,12020,wchasik,home,x"),
                StratumConnection.Parse(AlgoNiceHashEnum.Equihash, "europe.equihash-hub.miningpoolhub.com,12023,wchasik,home,x"),
                StratumConnection.Parse(AlgoNiceHashEnum.CryptoNight, "europe.cryptonight-hub.miningpoolhub.com,12024,wchasik,home,x")
            };

            serversList.Where(sc => sc.Algo == AlgoNiceHashEnum.NeoScrypt || sc.Algo == AlgoNiceHashEnum.Equihash || sc.Algo == AlgoNiceHashEnum.CryptoNight || sc.Algo == AlgoNiceHashEnum.Lyra2REv2)
            .ToList().ForEach(server =>
            {
                var pinger = new PingServer(server, 10000);

                pinger.PingResultChanged += result =>
                {
                    //System.Console.BackgroundColor = result.Success ? ConsoleColor.Cyan : ConsoleColor.Red;

                    System.Console.WriteLine($"minutes: {(DateTime.Now - result.DateTime).TotalMinutes:#######.##} ; {result.Success} ; {result.Result}");
                };

                pinger.GotResponse += (sender, stratumEventArgs) =>
                {
                };
            });



            System.Console.ReadLine();
        }