static GetValueOrErrorSettings() { var defaultSettings = new Dictionary <string, bool> { //plugin { "Version", false }, //breaks at MinerPluginsManager.cs:127 { "Name", false }, //breaks at MinerPluginsManager.cs:127 { "Author", false }, //doesn't break anything { "PluginUUID", false }, //breaks at MinerPluginsManager.cs:90 { "CanGroup", false }, //doesn't break anything { "CheckBinaryPackageMissingFiles", false }, // broken miner doesn't get downloaded { "CreateMiner", false }, // NHML crashes if the mining wants to be started { "GetApiMaxTimeout", false }, // doesn't break anything { "GetSupportedAlgorithms", false }, //breaks at MinerPluginsManager.cs:116 { "InitInternals", false }, //breaks at MinerPluginsManager.cs:138 { "ShouldReBenchmarkAlgorithmOnDevice", false }, // doesn't break anything //miner { "GetMinerStatsDataAsync", false }, // doesn't break anything { "InitMiningLocationAndUsername", false }, // doesn't break anything { "InitMiningPairs", false }, // doesn't break anything { "StartBenchmark", false }, // doesn't break anything { "StartMining", false }, // doesn't break anything { "StopMining", false } // doesn't break anything //{ "KEY", false } }; var fromFile = false; (_settings, fromFile) = InternalConfigs.GetDefaultOrFileSettings(Paths.MinerPluginsPath("BrokenMinerPluginUUID", "settings.json"), defaultSettings); }
internal static void InitStratumServiceHelpers() { if (BuildOptions.CUSTOM_ENDPOINTS_ENABLED == false) { return; } (_serviceCustomSettings, _) = InternalConfigs.GetDefaultOrFileSettings(Paths.RootPath("custom_endpoints_settings.json"), ServiceCustomSettings.Defaults()); }
public static void Init() { if (_initCalled) { return; } _initCalled = true; var(buildSettings, buildSettingsFromFile) = InternalConfigs.GetDefaultOrFileSettings(Paths.RootPath("build_settings.json"), new BuildOptionSettings { }, true); Logger.Info("BuildOptions", $"Init from file '{buildSettingsFromFile}'"); BUILD_TAG = buildSettings.BUILD_TAG; IS_PLUGINS_TEST_SOURCE = buildSettings.IS_PLUGINS_TEST_SOURCE; CUSTOM_ENDPOINTS_ENABLED = buildSettings.CUSTOM_ENDPOINTS_ENABLED; FORCE_MINING = buildSettings.FORCE_MINING; FORCE_PROFITABLE = buildSettings.FORCE_PROFITABLE; SHOW_TDP_SETTINGS = buildSettings.SHOW_TDP_SETTINGS; }
static MinerPluginsUpdaterSettings() { (_settings, _) = InternalConfigs.GetDefaultOrFileSettings(Paths.InternalsPath("MinerPluginsUpdaterSettings.json"), new SupportedAlgorithmsFilterSettingsFile()); }
static AcceptedPlugins() { (AcceptedPluginUUIDs, _) = InternalConfigs.GetDefaultOrFileSettings(AcceptedPluginsPath, new List <string> { }); }
static DeviceDetection() { (Settings, _) = InternalConfigs.GetDefaultOrFileSettings(Paths.InternalsPath("devices.json"), new DeviceDetectionSettings { }); }