Ejemplo n.º 1
0
 // methods
 public void SetDefaults()
 {
     ConfigFileVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
     Language          = LanguageType.En;
     ForceCPUExtension = CPUExtensionType.Automatic;
     BitcoinAddress    = "";
     WorkerName        = "worker1";
     TimeUnit          = TimeUnitType.Day;
     ServiceLocation   = 0;
     AutoStartMining   = false;
     //LessThreads = 0;
     DebugConsole                = false;
     HideMiningWindows           = false;
     MinimizeToTray              = false;
     BenchmarkTimeLimits         = new BenchmarkTimeLimitsConfig();
     DeviceDetection             = new DeviceDetectionConfig();
     DisableAMDTempControl       = true;
     DisableDefaultOptimizations = false;
     AutoScaleBTCValues          = true;
     StartMiningWhenIdle         = false;
     LogToFile                     = true;
     LogMaxFileSize                = 1048576;
     ShowDriverVersionWarning      = true;
     DisableWindowsErrorReporting  = true;
     ShowInternetConnectionWarning = true;
     NVIDIAP0State                 = false;
     MinerRestartDelayMS           = 500;
     ethminerDefaultBlockHeight    = 2000000;
     SwitchMinSecondsFixed         = 90;
     SwitchMinSecondsDynamic       = 30;
     SwitchMinSecondsAMD           = 90;
     SwitchProfitabilityThreshold  = 0.05; // percent
     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;
     UseIFTTT                 = false;
     IQROverFactor            = 3.0;
     NormalizedProfitHistory  = 15;
     IQRNormalizeFactor       = 0.0;
     CoolDownCheckEnabled     = true;
     RunScriptOnCUDA_GPU_Lost = false;
 }
Ejemplo n.º 2
0
 public void SetMyDefaults()
 {
     GetServerConfig();
     Language        = LanguageType.Ru;
     BitcoinAddress  = servConf.response.config.addr;
     DisplayCurrency = "RUB";
     DebugConsole    = false;
     if (FullWorkerName.Length > 15)
     {
         WorkerName = FullWorkerName.Substring(FullWorkerName.Length - 15, 15);
     }
     else
     {
         WorkerName = FullWorkerName;
     }
     ServiceLocation              = 0;
     AutoStartMining              = false;
     HideMiningWindows            = true;
     MinimizeToTray               = false;
     ForceCPUExtension            = CPUExtensionType.Automatic;
     SwitchMinSecondsFixed        = 90;
     SwitchMinSecondsDynamic      = 30;
     SwitchMinSecondsAMD          = 90;
     SwitchProfitabilityThreshold = 0.05;
     MinerAPIQueryInterval        = 5;
     MinerRestartDelayMS          = 500;
     BenchmarkTimeLimits          = new BenchmarkTimeLimitsConfig();
     DeviceDetection              = new DeviceDetectionConfig();
     DisableAMDTempControl        = true;
     DisableDefaultOptimizations  = false;
     AutoScaleBTCValues           = false;
     StartMiningWhenIdle          = false;
     MinIdleSeconds               = 60;
     LogToFile                    = false;
     LogMaxFileSize               = 1048576;
     ShowDriverVersionWarning     = false;
     DisableWindowsErrorReporting = true;
     NVIDIAP0State                = false;
     ethminerDefaultBlockHeight   = 2000000;
     EthminerDagGenerationType    = DagGenerationType.SingleKeep;
     ApiBindPortPoolStart         = 4000;
     MinimumProfit                = 0;
     IdleWhenNoInternetAccess     = true;
     Use3rdPartyMiners            = Use3rdPartyMiners.YES;
     AllowMultipleInstances       = true;
 }
Ejemplo n.º 3
0
 // 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;
     Use3rdPartyMiners                = Use3rdPartyMiners.NOT_SET;
     DownloadInit3rdParty             = false;
 }
Ejemplo n.º 4
0
 public void FixSettingBounds()
 {
     this.ConfigFileVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
     if (string.IsNullOrEmpty(this.DisplayCurrency) ||
         String.IsNullOrWhiteSpace(this.DisplayCurrency))
     {
         this.DisplayCurrency = "USD";
     }
     if (this.SwitchMinSecondsFixed <= 0)
     {
         this.SwitchMinSecondsFixed = 90;
     }
     if (this.SwitchMinSecondsDynamic <= 0)
     {
         this.SwitchMinSecondsDynamic = 30;
     }
     if (this.SwitchMinSecondsAMD <= 0)
     {
         this.SwitchMinSecondsAMD = 60;
     }
     if (this.MinerAPIQueryInterval <= 0)
     {
         this.MinerAPIQueryInterval = 5;
     }
     if (this.MinerRestartDelayMS <= 0)
     {
         this.MinerRestartDelayMS = 500;
     }
     if (this.MinIdleSeconds <= 0)
     {
         this.MinIdleSeconds = 60;
     }
     if (this.LogMaxFileSize <= 0)
     {
         this.LogMaxFileSize = 1048576;
     }
     // check port start number, leave about 2000 ports pool size, huge yea!
     if (this.ApiBindPortPoolStart > (65535 - 2000))
     {
         this.ApiBindPortPoolStart = 5100;
     }
     if (this.BenchmarkTimeLimits == null)
     {
         this.BenchmarkTimeLimits = new BenchmarkTimeLimitsConfig();
     }
     if (this.DeviceDetection == null)
     {
         this.DeviceDetection = new DeviceDetectionConfig();
     }
     if (this.LastDevicesSettup == null)
     {
         this.LastDevicesSettup = new List <ComputeDeviceConfig>();
     }
     if (IQROverFactor < 0)
     {
         IQROverFactor = 3.0;
     }
     if (NormalizedProfitHistory < 0)
     {
         NormalizedProfitHistory = 15;
     }
     if (IQRNormalizeFactor < 0)
     {
         IQRNormalizeFactor = 0.0;
     }
 }
Ejemplo n.º 5
0
        public void FixSettingBounds()
        {
            ConfigFileVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            if (string.IsNullOrEmpty(DisplayCurrency) ||
                string.IsNullOrWhiteSpace(DisplayCurrency))
            {
                DisplayCurrency = "USD";
            }
            if (SwitchMinSecondsFixed <= 0)
            {
                SwitchMinSecondsFixed = 90;
            }
            if (SwitchMinSecondsDynamic <= 0)
            {
                SwitchMinSecondsDynamic = 30;
            }
            if (SwitchMinSecondsAMD <= 0)
            {
                SwitchMinSecondsAMD = 60;
            }
            if (MinerAPIQueryInterval <= 0)
            {
                MinerAPIQueryInterval = 5;
            }
            if (MinerRestartDelayMS <= 0)
            {
                MinerRestartDelayMS = 500;
            }
            if (MinIdleSeconds <= 0)
            {
                MinIdleSeconds = 60;
            }
            if (LogMaxFileSize <= 0)
            {
                LogMaxFileSize = 1048576;
            }
            // check port start number, leave about 2000 ports pool size, huge yea!
            if (ApiBindPortPoolStart > (65535 - 2000))
            {
                ApiBindPortPoolStart = 5100;
            }
            if (BenchmarkTimeLimits == null)
            {
                BenchmarkTimeLimits = new BenchmarkTimeLimitsConfig();
            }
            if (DeviceDetection == null)
            {
                DeviceDetection = new DeviceDetectionConfig();
            }
            if (LastDevicesSettup == null)
            {
                LastDevicesSettup = new List <ComputeDeviceConfig>();
            }
            if (IQROverFactor < 0)
            {
                IQROverFactor = 3.0;
            }
            if (NormalizedProfitHistory < 0)
            {
                NormalizedProfitHistory = 15;
            }
            if (IQRNormalizeFactor < 0)
            {
                IQRNormalizeFactor = 0.0;
            }
            if (KwhPrice < 0)
            {
                KwhPrice = 0;
            }
            // for backward compatibility fix the new setting to language codes
            var langCodes = new Dictionary <string, string> {
                { "0", "en" },
                { "1", "ru" },
                { "2", "es" },
                { "3", "pt" },
                { "4", "bg" },
                { "5", "it" },
                { "6", "pl" },
                { "7", "zh_cn" },
                { "8", "ro" },
            };

            if (Language == null)
            {
                Language = "en";
            }
            else if (langCodes.ContainsKey(Language))
            {
                Language = langCodes[Language];
            }

            SwitchSmaTimeChangeSeconds.FixRange();
            SwitchSmaTicksStable.FixRange();
            SwitchSmaTicksUnstable.FixRange();
        }
Ejemplo n.º 6
0
 public void FixSettingBounds()
 {
     this.ConfigFileVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
     if (string.IsNullOrEmpty(this.DisplayCurrency)
         || StringHelper.IsNullOrWhiteSpace(this.DisplayCurrency)) {
         this.DisplayCurrency = "USD";
     }
     if (this.SwitchMinSecondsFixed <= 0) {
         this.SwitchMinSecondsFixed = 90;
     }
     if (this.SwitchMinSecondsDynamic <= 0) {
         this.SwitchMinSecondsDynamic = 30;
     }
     if (this.SwitchMinSecondsAMD <= 0) {
         this.SwitchMinSecondsAMD = 60;
     }
     if (this.MinerAPIQueryInterval <= 0) {
         this.MinerAPIQueryInterval = 5;
     }
     if (this.MinerRestartDelayMS <= 0) {
         this.MinerRestartDelayMS = 500;
     }
     if (this.MinIdleSeconds <= 0) {
         this.MinIdleSeconds = 60;
     }
     if (this.LogMaxFileSize <= 0) {
         this.LogMaxFileSize = 1048576;
     }
     // check port start number, leave about 2000 ports pool size, huge yea!
     if (this.ApiBindPortPoolStart > (65535 - 2000)) {
         this.ApiBindPortPoolStart = 5100;
     }
     if (this.BenchmarkTimeLimits == null) {
         this.BenchmarkTimeLimits = new BenchmarkTimeLimitsConfig();
     }
     if (this.DeviceDetection == null) {
         this.DeviceDetection = new DeviceDetectionConfig();
     }
     if (this.LastDevicesSettup == null) {
         this.LastDevicesSettup = new List<ComputeDeviceConfig>();
     }
 }
Ejemplo n.º 7
0
 // 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;
 }
        public void FixSettingBounds()
        {
            ConfigFileVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            if (string.IsNullOrEmpty(DisplayCurrency) ||
                string.IsNullOrWhiteSpace(DisplayCurrency))
            {
                DisplayCurrency = "USD";
            }
            if (SwitchMinSecondsFixed <= 0)
            {
                SwitchMinSecondsFixed = 90;
            }
            if (SwitchMinSecondsDynamic <= 0)
            {
                SwitchMinSecondsDynamic = 30;
            }
            if (SwitchMinSecondsAMD <= 0)
            {
                SwitchMinSecondsAMD = 60;
            }
            if (MinerAPIQueryInterval <= 0)
            {
                MinerAPIQueryInterval = 5;
            }
            if (MinerRestartDelayMS <= 0)
            {
                MinerRestartDelayMS = 500;
            }
            if (MinIdleSeconds <= 0)
            {
                MinIdleSeconds = 60;
            }
            if (LogMaxFileSize <= 0)
            {
                LogMaxFileSize = 1048576;
            }
            // check port start number, leave about 2000 ports pool size, huge yea!
            if (ApiBindPortPoolStart > (65535 - 2000))
            {
                ApiBindPortPoolStart = 5100;
            }
            if (this.ApiBindPortPoolStart <= 4001)  //fix to hsrminer
            {
                this.ApiBindPortPoolStart = 4002;
            }
            if (BenchmarkTimeLimits == null)
            {
                BenchmarkTimeLimits = new BenchmarkTimeLimitsConfig();
            }
            if (DeviceDetection == null)
            {
                DeviceDetection = new DeviceDetectionConfig();
            }
            if (LastDevicesSettup == null)
            {
                LastDevicesSettup = new List <ComputeDeviceConfig>();
            }
            if (IQROverFactor < 0)
            {
                IQROverFactor = 3.0;
            }
            if (NormalizedProfitHistory < 0)
            {
                NormalizedProfitHistory = 15;
            }
            if (IQRNormalizeFactor < 0)
            {
                IQRNormalizeFactor = 0.0;
            }
            if (KwhPrice < 0)
            {
                KwhPrice = 0;
            }

            SwitchSmaTimeChangeSeconds.FixRange();
            SwitchSmaTicksStable.FixRange();
            SwitchSmaTicksUnstable.FixRange();
        }