public MinerEtherum(string minerDeviceName, string blockString) : base(minerDeviceName) { Path = Ethereum.EtherMinerPath; _isEthMinerExit = true; CurrentBlockString = blockString; DagGenerationType = ConfigManager.GeneralConfig.EthminerDagGenerationType; }
public static string GetDagGenerationString(DagGenerationType type) { switch (type) { case DagGenerationType.Parallel: return "parallel"; case DagGenerationType.Sequential: return "sequential"; case DagGenerationType.Single: return "single"; case DagGenerationType.SingleKeep: return "singlekeep"; } return "singlekeep"; }
// methods public void SetDefaults() { ConfigFileVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; Language = LanguageType.En; ForceCPUExtension = CPUExtensionType.Automatic; BitcoinAddress = ""; WorkerName = "worker1"; ServiceLocation = 0; AutoStartMining = false; //LessThreads = 0; DebugConsole = false; HideMiningWindows = false; MinimizeToTray = false; BenchmarkTimeLimits = new BenchmarkTimeLimitsConfig(); DeviceDetection = new DeviceDetectionConfig(); DisableAMDTempControl = false; DisableDefaultOptimizations = false; AutoScaleBTCValues = true; StartMiningWhenIdle = false; LogToFile = true; LogMaxFileSize = 1048576; ShowDriverVersionWarning = true; DisableWindowsErrorReporting = true; NVIDIAP0State = false; MinerRestartDelayMS = 500; ethminerDefaultBlockHeight = 2000000; SwitchMinSecondsFixed = 90; SwitchMinSecondsDynamic = 30; SwitchMinSecondsAMD = 90; MinIdleSeconds = 60; DisplayCurrency = "USD"; ApiBindPortPoolStart = 4000; MinimumProfit = 0; EthminerDagGenerationType = DagGenerationType.SingleKeep; DownloadInit = false; //ContinueMiningIfNoInternetAccess = false; IdleWhenNoInternetAccess = true; Use3rdPartyMiners = Use3rdPartyMiners.NOT_SET; DownloadInit3rdParty = false; AllowMultipleInstances = true; }
protected override void InitializeObject() { if (_file.ConfigFileVersion == null || _file.ConfigFileVersion.CompareTo(System.Reflection.Assembly.GetExecutingAssembly().GetName().Version) != 0) { IsNewVersion = true; Helpers.ConsolePrint("GeneralConfig", "Config file is from an older version of NiceHashMiner.."); Helpers.ConsolePrint("GeneralConfig", String.Format("Backing up {0} to {1}..", FilePath, FilePathOld)); try { if (File.Exists(FilePathOld)) { File.Delete(FilePathOld); } File.Move(FilePath, FilePathOld); } catch { } SetDefaults(); } // init fields Language = _file.Language; DisplayCurrency = _file.DisplayCurrency; DebugConsole = _file.DebugConsole; BitcoinAddress = _file.BitcoinAddress; WorkerName = _file.WorkerName; ServiceLocation = _file.ServiceLocation; AutoStartMining = _file.AutoStartMining; HideMiningWindows = _file.HideMiningWindows; MinimizeToTray = _file.MinimizeToTray; //LessThreads = _file.LessThreads; ForceCPUExtension = _file.ForceCPUExtension; SwitchMinSecondsFixed = _file.SwitchMinSecondsFixed; SwitchMinSecondsDynamic = _file.SwitchMinSecondsDynamic; SwitchMinSecondsAMD = _file.SwitchMinSecondsAMD; MinerAPIQueryInterval = _file.MinerAPIQueryInterval; MinerRestartDelayMS = _file.MinerRestartDelayMS; if (_file.BenchmarkTimeLimits != null) { this.BenchmarkTimeLimits = _file.BenchmarkTimeLimits; } if (_file.DeviceDetection != null) { this.DeviceDetection = _file.DeviceDetection; } AutoScaleBTCValues = _file.AutoScaleBTCValues; StartMiningWhenIdle = _file.StartMiningWhenIdle; MinIdleSeconds = _file.MinIdleSeconds; LogToFile = _file.LogToFile; LogMaxFileSize = _file.LogMaxFileSize; ShowDriverVersionWarning = _file.ShowDriverVersionWarning; DisableWindowsErrorReporting = _file.DisableWindowsErrorReporting; NVIDIAP0State = _file.NVIDIAP0State; ethminerDefaultBlockHeight = _file.ethminerDefaultBlockHeight; EthminerDagGenerationType = _file.EthminerDagGenerationType; ApiBindPortPoolStart = _file.ApiBindPortPoolStart; MinimumProfit = _file.MinimumProfit; DisableAMDTempControl = _file.DisableAMDTempControl; DisableDefaultOptimizations = _file.DisableDefaultOptimizations; ContinueMiningIfNoInternetAccess = _file.ContinueMiningIfNoInternetAccess; if (!IsNewVersion) { DownloadInit = _file.DownloadInit; } Use3rdPartyMiners = _file.Use3rdPartyMiners; DownloadInit3rdParty = _file.DownloadInit3rdParty; hwidLoadFromFile = true; hwidOK = this.hwid == _file.hwid; }
protected MinerEtherum(string minerDeviceName, string blockString) : base(minerDeviceName) { CurrentBlockString = blockString; _dagGenerationType = ConfigManager.GeneralConfig.EthminerDagGenerationType; }