private string CreateCommandLine(string username) { _apiPort = GetAvaliablePort(); var algo = PluginSupportedAlgorithms.AlgorithmName(_algorithmType); var url = StratumServiceHelpers.GetLocationUrl(_algorithmType, _miningLocation, NhmConectionType.NONE); var paths = GetBinAndCwdPaths(); var configString = ""; if (_extraLaunchParameters != "") { var arrayOfELP = _extraLaunchParameters.Split(' '); foreach (var elp in arrayOfELP) { configString += $"{elp}\r\n"; } } var devs = string.Join(",", _miningPairs.Select(p => _mappedDeviceIds[p.Device.UUID])); configString += $"webPort={_apiPort}\r\nwatchdog=false\n\r\n\r[{algo}]\r\nwallet={username}\r\nrigName=\r\ndevices={devs}\r\npool1={url}"; try { File.WriteAllText(Path.Combine(paths.Item2, $"config_nh_{devs}.ini"), configString); } catch (Exception e) { Logger.Error(_logGroup, $"Unable to create config file: {e.Message}"); } return($"config_nh_{devs}.ini"); }
List <Algorithm> GetSupportedAlgorithms(IGpuDevice gpu) { var algorithms = PluginSupportedAlgorithms.GetSupportedAlgorithmsGPU(PluginUUID).ToList(); if (PluginSupportedAlgorithms.UnsafeLimits(PluginUUID)) { return(algorithms); } var filteredAlgorithms = Filters.FilterInsufficientRamAlgorithmsList(gpu.GpuRam, algorithms); return(filteredAlgorithms); }
public NanoMinerPlugin() { // set default internal settings MinerOptionsPackage = PluginInternalSettings.MinerOptionsPackage; // https://bitcointalk.org/index.php?topic=5089248.0 | https://github.com/nanopool/nanominer/releases MinersBinsUrlsSettings = new MinersBinsUrlsSettings { BinVersion = "v1.6.2", ExePath = new List <string> { "nanominer-windows-1.6.2", "nanominer.exe" }, Urls = new List <string> { "https://github.com/nanopool/nanominer/releases/download/v1.6.2/nanominer-windows-1.6.2.zip", // original } }; PluginMetaInfo = new PluginMetaInfo { PluginDescription = "Nanominer is a versatile tool for mining cryptocurrencies which are based on Ethash, Ubqhash, Cuckaroo29, CryptoNight (v6, v7, v8, R, ReverseWaltz) and RandomHash (PascalCoin) algorithms.", SupportedDevicesAlgorithms = PluginSupportedAlgorithms.SupportedDevicesAlgorithmsDict() }; }
protected virtual string AlgorithmName(AlgorithmType algorithmType) => PluginSupportedAlgorithms.AlgorithmName(algorithmType);