Пример #1
0
        private Dictionary<string, Profile> GetDefaultProfileList()
        {
            CustomAlgo groestl = new CustomAlgo
            {
                Use = true,
                Name = "GROESTL",
                SynonymsCsv = "",
                HashRate = 7.7,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo myrgroestl = new CustomAlgo
            {
                Use = true,
                Name = "MYR-GROESTL",
                SynonymsCsv = "MYRIADGROESTL",
                HashRate = 12.9,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo fugue = new CustomAlgo
            {
                Use = true,
                Name = "FUGUE",
                SynonymsCsv = "FUGUE256",
                HashRate = 93.9,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo jha = new CustomAlgo
            {
                Use = true,
                Name = "JHA",
                SynonymsCsv = "JACKPOT",
                HashRate = 5.6,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo nist5 = new CustomAlgo
            {
                Use = true,
                Name = "NIST5",
                SynonymsCsv = "",
                HashRate = 8.4,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo heavy = new CustomAlgo
            {
                Use = true,
                Name = "HEAVY",
                SynonymsCsv = "HEFTY,HEFTY1,HEAVYCOIN",
                HashRate = 13.1,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo x11 = new CustomAlgo
            {
                Use = true,
                Name = "X11",
                SynonymsCsv = "",
                HashRate = 2.6,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo x13 = new CustomAlgo
            {
                Use = true,
                Name = "X13",
                SynonymsCsv = "",
                HashRate = 2.0,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo x15 = new CustomAlgo
            {
                Use = true,
                Name = "X15",
                SynonymsCsv = "",
                HashRate = 1.5,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo quark = new CustomAlgo
            {
                Use = true,
                Name = "QUARK",
                SynonymsCsv = "",
                HashRate = 4.5,
                Wattage = 0,
                Style = "Classic",
                Target = 24
            };

            CustomAlgo qubit = new CustomAlgo
            {
                Use = true,
                Name = "QUBIT",
                SynonymsCsv = "",
                HashRate = 3.9,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo keccak = new CustomAlgo
            {
                Use = true,
                Name = "KECCAK",
                SynonymsCsv = "",
                HashRate = 163.1,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo scrypt = new CustomAlgo
            {
                Use = true,
                Name = "SCRYPT",
                SynonymsCsv = "",
                HashRate = 0.28,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo scryptn = new CustomAlgo
            {
                Use = true,
                Name = "SCRYPTN",
                SynonymsCsv = "SCRYPT-N,SCRYPT-ADAPTIVE-NFACTOR",
                HashRate = 0.14,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo scryptjane15 = new CustomAlgo
            {
                Use = true,
                Name = "SCRYPTJANE15",
                SynonymsCsv = "CHACHA (NF15)",
                HashRate = 0.0009,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo scryptjane14 = new CustomAlgo
            {
                Use = true,
                Name = "SCRYPTJANE14",
                SynonymsCsv = "CHACHA (NF14)",
                HashRate = 0.0034,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo scryptjane13 = new CustomAlgo
            {
                Use = true,
                Name = "SCRYPTJANE13",
                SynonymsCsv = "CHACHA (NF13)",
                HashRate = 0.0095,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            CustomAlgo cryptonight = new CustomAlgo
            {
                Use = true,
                Name = "CRYPTONIGHT",
                SynonymsCsv = "",
                HashRate = 0.00022,
                Wattage = 0,
                Style = "CryptoNight",
                Target = 0
            };

            CustomAlgo sha256 = new CustomAlgo
            {
                Use = false,
                Name = "SHA256",
                SynonymsCsv = "SHA-256",
                HashRate = 0,
                Wattage = 0,
                Style = "Classic",
                Target = 32
            };

            BindingList<CustomAlgo> algoList = new BindingList<CustomAlgo>
            {
                groestl,
                myrgroestl,
                fugue,
                jha,
                nist5,
                heavy,
                x11,
                x13,
                x15,
                quark,
                qubit,
                keccak,
                scrypt,
                scryptn,
                scryptjane15,
                scryptjane14,
                scryptjane13,
                cryptonight,
                sha256
            };

            Profile defaultProfile = new Profile
            {
                FiatOfChoice = 0,
                FiatPerKwh = 0.1,
                Multiplier = 1,
                CustomAlgoList = algoList
            };

            Dictionary<string, Profile> defaultProfileList = new Dictionary<string, Profile>
            {
                {"Default", defaultProfile}
            };

            return defaultProfileList;
        }
Пример #2
0
        private Profile GetProfileFromOldHashrates(OldHashrates hashratesTxt)
        {
            Profile profile = new Profile();
            foreach (KeyValuePair<string, double> hashrate in hashratesTxt.HashRateList)
            {
                CustomAlgo algo = new CustomAlgo
                {
                    Name = hashrate.Key.ToUpperInvariant(),
                    HashRate = hashrate.Value,
                    Wattage = hashratesTxt.WattageList[hashrate.Key],
                };

                // I was a fool for naming the keys differently :D
                switch (hashrate.Key)
                {
                    case "MyriadGroestl":
                        algo.Use = hashratesTxt.CheckedHashRates["MyrGroestl"];
                        break;
                    case "Nist5":
                        algo.Use = hashratesTxt.CheckedHashRates["NIST5"];
                        break;
                    case "Heavy":
                        algo.Use = hashratesTxt.CheckedHashRates["Hefty"];
                        break;
                    case "ScryptJane15":
                        algo.Use = hashratesTxt.CheckedHashRates["Jane15"];
                        break;
                    case "ScryptJane14":
                        algo.Use = hashratesTxt.CheckedHashRates["Jane14"];
                        break;
                    case "ScryptJane13":
                        algo.Use = hashratesTxt.CheckedHashRates["Jane13"];
                        break;
                    default:
                        algo.Use = hashratesTxt.CheckedHashRates[hashrate.Key];
                        break;
                }
                
                // Grabbing these new items from the default list
                foreach (CustomAlgo defaultAlgo in GetDefaultProfileList()["Default"].CustomAlgoList)
                {
                    if (defaultAlgo.Name == algo.Name)
                    {
                        algo.SynonymsCsv = defaultAlgo.SynonymsCsv;
                        algo.Style = defaultAlgo.Style;
                        algo.Target = defaultAlgo.Target;
                    }
                }

                profile.CustomAlgoList.Add(algo);
            }

            return profile;
        }
Пример #3
0
        private bool CheckUsedAlgo(string coinAlgo, CustomAlgo algo)
        {
            if (algo.Use == false) return false;
            if (coinAlgo == algo.Name ) return true;
            
            string[] splitSynonyms = algo.SynonymsCsv.Split(',');
            foreach (string synonym in splitSynonyms)
            {
                if (coinAlgo == synonym) return true;
            }

            return false;
        }