public bool Authenticate(IMiner miner) { try { if (!IsEnabled) return false; using (var connection = new MySqlConnection(_mySqlProvider.ConnectionString)) { // query the username against mpos pool_worker table. var result = connection.Query<string>( "SELECT password FROM pool_worker WHERE username = @username", new {username = miner.Username}).FirstOrDefault(); // if matching record exists for given miner username, then authenticate the miner. // note: we don't check for password on purpose. return result != null; } } catch (Exception e) { _logger.Error("An exception occured while reading pool_worker table; {0:l}", e.Message); return false; } }
public MinerAuthenticationEventArgs(IMiner miner) { if (miner == null) throw new ArgumentNullException("miner"); this.Miner = miner; }
public bool Authenticate(IMiner miner) { // within current implementation of hybrid storage layer, we don't have users registered to a pool but they // just mine with supplying a valid coin wallet address as username. So we just need to make sure the username // is valid address against the coin network. try { return _daemonClient.ValidateAddress(miner.Username).IsValid; // if so validate it against coin daemon as an address. } catch (RpcException) { return false; } }
public SocketServiceContext(IMiner miner) { Miner = miner; }
public MinerEventArgs(IMiner miner) { Miner = miner; }
public bool SubmitWork(IMiner miner, Work work, string comment) { return onWork(miner, work); }
public MinerInfoLogs(IMiner miner, MinerInfo parent) { Miner = miner; m_Parent = parent; InitializeComponent(); }
public MinerProgramBase(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) { MinerState = MinerProgramState.Stopped; MainCoin = mainCoin; MainCoinConfigurer = mainCoin.SettingsScreen; DualCoin = dualCoin; if (DualCoin != null) { DualCoinConfigurer = DualCoin.SettingsScreen; } DualMining = dualMining; Name = minerName; Miner = miner; AutomaticScriptGeneration = true; m_downloader = new MinerDownloader(MINERURL, EXENAME, Miner); Enabled = false; GenerateScript(false); }
/// <summary> /// Creates a <see cref="HttpWebRequest"/> for JSON-RPC. /// </summary> /// <param name="miner"></param> /// <param name="comment"></param> /// <returns></returns> HttpWebRequest OpenRpc(IMiner miner, string comment) { return Open(url, "POST", miner, comment); }
/// <summary> /// Invokes the 'getwork' JSON method, submitting the proposed work. Returns <c>true</c> if the service accepts /// the proposed work. /// </summary> /// <param name="work"></param> /// <returns></returns> public bool SubmitWorkRpc(IMiner miner, Work work, string comment) { var req = OpenRpc(miner, comment); if (req == null) return false; // header needs to have SHA-256 padding appended var data = Sha256.AllocateInputBuffer(80); // prepare header buffer with SHA-256 Sha256.Prepare(data, 80, 0); Sha256.Prepare(data, 80, 1); // dump header data on top of padding Array.Copy(work.Header, data, 80); // encode in proper format var solution = Memory.Encode(data); Console.WriteLine(); Console.WriteLine("SOLUTION: {0,10} {1}", miner.GetType().Name, Memory.Encode(work.Header)); Console.WriteLine(); Console.WriteLine(); using (var txt = new StreamWriter(req.GetRequestStream())) using (var wrt = new JsonTextWriter(txt)) { wrt.WriteStartObject(); wrt.WriteMember("id"); wrt.WriteString("json"); wrt.WriteMember("method"); wrt.WriteString("getwork"); wrt.WriteMember("params"); wrt.WriteStartArray(); wrt.WriteString(solution); wrt.WriteEndArray(); wrt.WriteEndObject(); wrt.Flush(); } using (var txt = new StreamReader(req.GetResponse().GetResponseStream())) using (var rdr = new JsonTextReader(txt)) { if (!rdr.MoveToContent() && rdr.Read()) throw new JsonException("Unexpected content from 'getwork <data>'."); var response = JsonConvert.Import<JsonSubmitWork>(rdr); if (response == null) throw new JsonException("No response returned."); if (response.Error != null) Console.WriteLine("JSON-RPC: {0}", response.Error); Console.WriteLine(); Console.WriteLine("{0}: {1,10} {2}", response.Result ? "ACCEPTED" : "REJECTED", miner.GetType().Name, Memory.Encode(work.Header)); Console.WriteLine(); Console.WriteLine(); return response.Result; } }
/// <summary> /// Initializes a new instance. /// </summary> /// <param name="miner"></param> /// <param name="resource"></param> internal MinerEntry(IMiner miner, MinerDevice resource) { Miner = miner; Resource = resource; }
public HttpServiceContext(IMiner miner, HttpServiceRequest request) { Miner = miner; Request = request; }
public CCMiner(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) : base(mainCoin, dualMining, dualCoin, minerName, miner) { Type = "Nvidia"; GPUType = CardMake.Nvidia; OutputReader = new CCReader(STATS_LINK, STATS_LINK_PORT); MiningIntensityLow = 6; MiningIntensityHigh = 35; MiningIntensity = 23; MinerExehash = "9A8F7207D520B82ED98FF31EC4B539E2"; }
public CGMiner(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) : base(mainCoin, dualMining, dualCoin, minerName, miner) { Type = "AMD"; GPUType = CardMake.Amd; OutputReader = new CGReader(STATS_LINK, STATS_LINK_PORT); MiningIntensityLow = 2; MiningIntensityHigh = 19; MiningIntensity = 13; }
public FandangoFutureViewModel(IMinerModel minerModel, IMiner futureMiner) : this() { _fmlMiner = minerModel.Miners[MinerModel.FML_INDEX]; Miner = futureMiner; }
public bool AddMiner(IMiner miner) { bool toSave = false; ICoinConfigurer mainCoinConfigurer = miner.MainCoin.SettingsScreen; ICoinConfigurer dualCoinConfigurer = null; if (miner.DualMining) { dualCoinConfigurer = miner.DualCoin.SettingsScreen; } MinerData newMiner = new MinerData(); newMiner.Id = miner.Id; newMiner.Name = miner.Name; newMiner.Algorithm = miner.MainCoin.Algorithm.Name; //newMiner.BATFileName =""; newMiner.MainCoin = miner.MainCoin.Name; newMiner.MainCoinPool = mainCoinConfigurer.Pool; newMiner.MainCoinWallet = mainCoinConfigurer.Wallet; newMiner.MainCoinPassword = mainCoinConfigurer.Password; newMiner.MainCoinPoolAccount = mainCoinConfigurer.PoolAccount; newMiner.DualMining = miner.DualMining; newMiner.MinerGpuType = miner.MinerGpuType; newMiner.HashRate = miner.HashRate; if (miner.DualMining) { newMiner.DualCoin = miner.DualCoin.Name; newMiner.DualCoinPool = dualCoinConfigurer.Pool; newMiner.DualCoinWallet = dualCoinConfigurer.Wallet; newMiner.DualCoinPoolAccount = dualCoinConfigurer.PoolAccount; } //minerprograms foreach (IMinerProgram item in miner.MinerPrograms) { MinerScript script = new MinerScript(); script.BATfile = item.BATFILE; script.ProgramType = item.Type; script.AutomaticScriptGeneration = item.AutomaticScriptGeneration; script.MiningIntensity = item.MiningIntensity; newMiner.MinerScripts.Add(script); } //if a similar type is alredy present, them remove it List <int> removeIds = new List <int>(); int i = 0; foreach (MinerData item in Miners) { if (item.Id == miner.Id) { removeIds.Add(i); } i++; } foreach (int j in removeIds) { Miners.RemoveAt(j); } Miners.Add(newMiner); toSave = true; return(toSave); }
public CCMiner(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) : base(mainCoin, dualMining, dualCoin, minerName, miner) { Type = "Nvidia"; GPUType = CardMake.Nvidia; OutputReader = new CCReader(STATS_LINK, STATS_LINK_PORT); MiningIntensityLow = 6; MiningIntensityHigh = 35; MiningIntensity = 23; }
/// <summary> /// Opens a web request. /// </summary> /// <param name="url"></param> /// <param name="method"></param> /// <param name="miner"></param> /// <param name="comment"></param> /// <returns></returns> HttpWebRequest Open(Uri url, string method, IMiner miner, string comment) { // method requires an absolute url to function if (!url.IsAbsoluteUri) return null; // extract user information from url var user = url.UserInfo .Split(':') .Select(i => HttpUtility.UrlDecode(i)) .ToArray(); // create request, authenticating using information in the url var req = (HttpWebRequest)HttpWebRequest.Create(url); req.Timeout = (int)TimeSpan.FromSeconds(60).TotalMilliseconds; req.Credentials = new NetworkCredential(user[0], user[1]); req.PreAuthenticate = true; req.Method = method; req.Pipelined = true; req.UserAgent = "BitMaker"; req.Headers["X-BitMaker-MachineName"] = Environment.MachineName; if (miner != null) req.Headers["X-BitMaker-Miner"] = miner.GetType().Name; if (!string.IsNullOrWhiteSpace(comment)) req.Headers["X-BitMaker-Comment"] = comment; return req; }
public void SelectMiningView(IMiner miner) { ShowMiningInfo(miner); }
public void StartMining() { m_keepMining = true; ActiveMiner = SelectedMiner; SelectedMiner.StartMining(); }
public SocketServiceContext(IMiner miner, SocketServiceRequest request) { Miner = miner; Request = request; }
public void StartMiningDefaultMiner() { ActiveMiner = SelectedMiner; StartMining(ActiveMiner); }
public MinerStateHandler(IMiner miner) { _miner = miner ?? throw new ArgumentNullException(nameof(miner)); }
public Work GetWork(IMiner miner, string comment) { return Utils.Work; }
public CollierHub(IApplicationCancellationTokenFactory cancellationTokenFactory, IMiner miner, IEnumerable <IMiningInfoNotifier> miningInfoBroadcasters) { _cancellationTokenFactory = cancellationTokenFactory ?? throw new ArgumentNullException(nameof(cancellationTokenFactory)); _miner = miner ?? throw new ArgumentNullException(nameof(miner)); _miningInfoNotifiers = miningInfoBroadcasters ?? throw new ArgumentNullException(nameof(miningInfoBroadcasters)); }
private bool SendJobToMiner(IMiner miner, IJob job) { if (!miner.Authenticated) return false; if (!miner.Subscribed) return false; if (!miner.SupportsJobNotifications) return false; miner.SendDifficulty(); miner.SendJob(job); return true; }
public bool Authenticate(IMiner miner) { // empty storage layer is only used when no valid storage-layer configuration is available. // just authenticate all requests as basically we can't validate nor pay miners actually. return(true); }
public ClaymoreMiner(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) : base(mainCoin, dualMining, dualCoin, minerName, miner) { Type = "Claymore"; GPUType = CardMake.Amd;//Dont change this to common. it creates problem while we switch miner on/off in checkbox OutputReader = new ClayMoreEthReader(STATS_LINK); }
public HttpRpcContext(IMiner miner, HttpRpcResponse response) { this.Miner = miner; this.Response = response; }
public CGMiner(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) : base(mainCoin, dualMining, dualCoin, minerName, miner) { Type = "AMD"; GPUType = CardMake.Amd; OutputReader = new CGReader(STATS_LINK, STATS_LINK_PORT); MiningIntensityLow = 2; MiningIntensityHigh = 19; MiningIntensity = 13; MinerExehash = "557C6D2E68679C65898A5CBF8F188087"; }
private void Ban(IMiner miner) { // TODO: add vanilla miners to banlist too. if (miner is IGetworkMiner) // as vanilla miners doesn't use persistent connections, we don't need to disconect him return; // but just blacklist his ip. var client = (IClient) miner; var ip = client.Connection.RemoteEndPoint.Address; if(!_bannedIps.ContainsKey(ip)) _bannedIps.Add(ip, TimeHelpers.NowInUnixTimestamp()); client.Connection.Disconnect(); }
public ClaymoreCNCpu(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) : base(mainCoin, dualMining, dualCoin, minerName, miner) { Type = "CPU"; GPUType = CardMake.CPU; OutputReader = new ClayMoreCNCpuReader(STATS_LINK); }
public MainchainNodeService(IStateStore stateStore, ITxHub hub, IChainCreationService chainCreationService, IBlockSynchronizer blockSynchronizer, IChainService chainService, IMiner miner, ILogger logger) { _stateStore = stateStore; _chainCreationService = chainCreationService; _chainService = chainService; _txHub = hub; _logger = logger; _miner = miner; _blockSynchronizer = blockSynchronizer; }
public MinerFromPlugin(string pluginUUID, List <MiningPair> miningPairs, string groupKey) : base(pluginUUID, miningPairs, groupKey) { _plugin = MinerPluginsManager.GetPluginWithUuid(pluginUUID); _miner = _plugin.CreateMiner(); }
private static void CheckSwitching() { try { WriteInfo(" Check switching.."); IProfitSwitchingStrategy profitSwitchingStrategy = ProfitSwitchingStrategyFactory.GetProfitSwitchingStrategy(_profitSwitchingStrategy ?? ProfitSwitchingStrategy.MaximizeFiat); // Find optimal configs Dictionary <string, MiningConfig> optimalMiningConfigs = new Dictionary <string, MiningConfig>(); if (_manualMode) { foreach (var manualMininigConfig in _manualMininigConfigs) { MiningConfig miningConfig = new MiningConfig(manualMininigConfig.Value.DeviceConfig, manualMininigConfig.Value.Pool); optimalMiningConfigs.Add(manualMininigConfig.Key, miningConfig); } } else { foreach (Algorithm algorithm in Config.Algorithms) { if (algorithm.Enabled) { foreach (DeviceConfig algorithmDeviceConfig in algorithm.DeviceConfigs) { if (algorithmDeviceConfig.Enabled) { foreach (Pool algorithmPool in algorithm.Pools.Where(p => p.Enabled)) { Profit?profit = GetAdjustedProfit(algorithmPool, algorithmDeviceConfig.ExpectedHashrate, true); if (profit.HasValue) { if (!optimalMiningConfigs.ContainsKey(algorithmDeviceConfig.FullDeviceId)) { SetOptimalMiningConfigWithThreshold(profit.Value, profitSwitchingStrategy, algorithmDeviceConfig, algorithmPool, optimalMiningConfigs); } else { MiningConfig bestMiningConfig = optimalMiningConfigs[algorithmDeviceConfig.FullDeviceId]; Profit? bestProfit = GetAdjustedProfit(bestMiningConfig.Pool, bestMiningConfig.DeviceConfig.ExpectedHashrate, true); if (!bestProfit.HasValue || profitSwitchingStrategy.IsProfitABetterThanB(profit.Value, algorithmPool.ProfitTimeframe, bestProfit.Value, bestMiningConfig.Pool.ProfitTimeframe, 0)) { SetOptimalMiningConfigWithThreshold(profit.Value, profitSwitchingStrategy, algorithmDeviceConfig, algorithmPool, optimalMiningConfigs); } } } } } } } } } // Merge miners and get list of optimal miners List <IMiner> optimalMiners = new List <IMiner>(); foreach (var optimalMiningConfigKeyValue in optimalMiningConfigs) { MiningConfig miningConfig = optimalMiningConfigKeyValue.Value; IMiner miner = MinerFactory.GetMiner(new HashSet <DeviceConfig>() { miningConfig.DeviceConfig }, miningConfig.Pool); IMiner existingMiner = optimalMiners.FirstOrDefault(m => m.Name == miner.Name && m.Pool.Equals(miner.Pool)); if (existingMiner != null) { existingMiner.DeviceConfigs.Add(miningConfig.DeviceConfig); miningConfig.Miner = existingMiner; } else { miningConfig.Miner = miner; optimalMiners.Add(miner); } } bool displayNeedsUpdate = false; // Get list of current miners List <IMiner> currentMiners = GetCurrentMiners(); //Check if existing miner will be kept foreach (IMiner currentMiner in currentMiners) { if (optimalMiners.Any(om => om.Pool.Equals(currentMiner.Pool) && om.DeviceConfigs.SetEquals(currentMiner.DeviceConfigs))) { foreach (DeviceConfig currentMinerDeviceConfig in currentMiner.DeviceConfigs) { optimalMiningConfigs[currentMinerDeviceConfig.FullDeviceId].Miner = currentMiner; } } } //Check if existing miner has to be closed foreach (IMiner currentMiner in currentMiners.ToArray()) { if (!optimalMiners.Any(om => om.Pool.Equals(currentMiner.Pool) && om.DeviceConfigs.SetEquals(currentMiner.DeviceConfigs))) { displayNeedsUpdate = true; currentMiner.StopMiner(); currentMiners.Remove(currentMiner); } } //Check if new miner has to start foreach (IMiner optimalMiner in optimalMiners) { if (!currentMiners.Any(cm => cm.Pool.Equals(optimalMiner.Pool) && cm.DeviceConfigs.SetEquals(optimalMiner.DeviceConfigs))) { displayNeedsUpdate = true; foreach (DeviceConfig deviceConfig in optimalMiner.DeviceConfigs) { if (!string.IsNullOrEmpty(deviceConfig.PrepareScript)) { Helpers.ExecuteScript(deviceConfig.MinerPath, AppFolderPath); } } Task.Delay(TimeSpan.FromSeconds(Config.MinerStartDelay)).Wait(); optimalMiner.StartMiner(Config.StartMinerMinimized); } } _currentMininigConfigs = optimalMiningConfigs; if (displayNeedsUpdate) { _displayUpdaterCts?.Cancel(); } } catch (Exception e) { Log.Debug("Check switching failed: " + e); } }
/// <summary> /// Initiates a long-poll request for work. /// </summary> /// <param name="miner"></param> /// <param name="comment"></param> /// <returns></returns> Work GetWorkLp(IMiner miner, string comment) { var req = OpenLp(miner, comment); if (req == null) return null; var asy = req.BeginGetResponse(null, null); // wait until we're told to shutdown, or we run out of time var elapsed = 0; while (run && elapsed < TimeSpan.FromSeconds(60).TotalMilliseconds) { asy.AsyncWaitHandle.WaitOne(1000); elapsed += 1000; } if (!asy.IsCompleted) { // if it never completed, abort it req.Abort(); return null; } else // otherwise parse the result return ParseGetWork(req.EndGetResponse(asy)); }
public void StartMiner(Mineable mineable, Settings settings, string appRoot, DirectoryInfo appRootFolder) { _mineable = mineable; _process = new Process(); string minerPath = Helpers.ResolveToFullPath(mineable.CastXmrPath, appRoot); string minerFolderPath = Path.GetDirectoryName(minerPath); _process.StartInfo.FileName = "cmd"; List <string> userDefindedArgs = new List <string>(); if (!String.IsNullOrEmpty(mineable.CastXmrExtraArguments)) { userDefindedArgs.AddRange(mineable.CastXmrExtraArguments.Split(" ")); } string args = ""; string space = ""; if (!userDefindedArgs.Contains("-S")) { args = $"{space}-S {mineable.PoolAddress}"; space = " "; } if (!userDefindedArgs.Contains("-u")) { args += $"{space}-u {mineable.PoolWalletAddress}"; space = " "; } if (!userDefindedArgs.Contains("-p")) { args += $"{space}-p {mineable.PoolPassword}"; space = " "; } if (!userDefindedArgs.Any(a => a.Contains("--algo="))) { switch (mineable.Algorithm) { case Algorithm.CryptonightV7: args += $"{space}--algo=1"; break; case Algorithm.CryptonightHeavy: args += $"{space}--algo=2"; break; case Algorithm.CryptonightLite: args += $"{space}--algo=4"; break; case Algorithm.CryptonightBittube: args += $"{space}--algo=5"; break; case Algorithm.CryptonightStellite: args += $"{space}--algo=6"; break; case Algorithm.CryptonightHaven: args += $"{space}--algo=7"; break; case Algorithm.CryptonightMasari: args += $"{space}--algo=8"; break; default: throw new NotImplementedException("Couldn't start CastXmr, unknown algo: {mineable.Algorithm}\n" + "You can set --algo yourself in the extra arguments."); } space = " "; } if (!userDefindedArgs.Contains("--remoteaccess")) { args += $"{space}--remoteaccess"; space = " "; } if (!String.IsNullOrEmpty(mineable.CastXmrExtraArguments)) { args += space + mineable.CastXmrExtraArguments; } _process.StartInfo.Arguments = $"/c \"{Path.GetFileName(minerPath)} {args}\""; _process.StartInfo.UseShellExecute = true; _process.StartInfo.CreateNoWindow = false; _process.StartInfo.RedirectStandardOutput = false; _process.StartInfo.WorkingDirectory = minerFolderPath; _process.StartInfo.WindowStyle = settings.StartMinerMinimized ? ProcessWindowStyle.Minimized : ProcessWindowStyle.Normal; Thread.Sleep(TimeSpan.FromSeconds(settings.MinerStartDelay)); _process.Start(); if (mineable.CastXmrUseXmrStakCPUMining) { _cpuMiner = new XmrStakMiner(true); _cpuMiner.StartMiner(mineable, settings, appRoot, appRootFolder); } }
/// <summary> /// Creates a <see cref="HttpWebRequest"/> for long-polling. /// </summary> /// <param name="miner"></param> /// <param name="comment"></param> /// <returns></returns> HttpWebRequest OpenLp(IMiner miner, string comment) { return Open(longPollUrl, "GET", miner, comment); }
public SocketsRpcContext(IMiner miner, SocketsRpcRequest request) { this.Miner = miner; this.Request = request; }
/// <summary> /// Invokes the 'getwork' JSON method and parses the result into a new <see cref="T:Work"/> instance. /// </summary> /// <returns></returns> public Work GetWorkRpc(IMiner miner, string comment) { var req = OpenRpc(miner, comment); if (req == null) return null; // submit method invocation using (var txt = new StreamWriter(req.GetRequestStream())) using (var wrt = new JsonTextWriter(txt)) { wrt.WriteStartObject(); wrt.WriteMember("id"); wrt.WriteString("json"); wrt.WriteMember("method"); wrt.WriteString("getwork"); wrt.WriteMember("params"); wrt.WriteStartArray(); wrt.WriteEndArray(); wrt.WriteEndObject(); wrt.Flush(); } return ParseGetWork(req.GetResponse()); }
public void Init() { IMiner miner = Factory.Instance.CoreObject.SelectedMiner; ((MinerBase)miner).InitProfitability(); }
public Account(IMiner miner) : this(-1, miner.Username, miner.Username) { }
public CCMiner(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) : base(mainCoin, dualMining, dualCoin, minerName, miner) { Type = "Nvidia"; GPUType = CardMake.Nvidia; OutputReader = new CCReader(STATS_LINK); }
public void SelectMiner(IMiner miner) { SelectedMiner = miner; Factory.Instance.Model.MakeSelectedMiner(miner); Factory.Instance.ViewObject.UpdateMinerList(); }
public NBAAnalizer(IMiner<ShortMatchResult> shortMatchResultsMiner, IMiner<CityPopulation> cityMiner, IJoiner joiner) { _shortMatchResultsMiner = shortMatchResultsMiner; _cityMiner = cityMiner; _joiner = joiner; }
public IMiner CreateMiner(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName) { IMiner miner = CreateMiner(GenerateUniqueID(), mainCoin, dualMining, dualCoin, minerName, null); return(miner); }
public MinerFromPlugin(string pluginUUID) : base(pluginUUID) { var plugin = MinerPluginsManager.GetPluginWithUuid(pluginUUID); _miner = plugin.CreateMiner(); }
public bool Authenticate(IMiner miner) { // empty storage layer is only used when no valid storage-layer configuration is available. // just authenticate all requests as basically we can't validate nor pay miners actually. return true; }
public CCMiner(ICoin mainCoin, bool dualMining, ICoin dualCoin, string minerName, IMiner miner) : base(mainCoin, dualMining, dualCoin, minerName, miner) { Type = "Nvidia"; GPUType = CardMake.Nvidia; OutputReader = new CCReader(STATS_LINK, STATS_LINK_PORT); MiningIntensityLow = 6; MiningIntensityHigh = 35; MiningIntensity = 23; MinerExehash = "84CFA420A3C210535FF991900B9E191F"; }
public void ReportHashes(IMiner plugin, long count) { }
private bool SendJobToMiner(IMiner miner, IJob job) { if (miner is IGetworkMiner) // only stratum miners needs to be submitted new jobs. return false; var stratumMiner = (IStratumMiner) miner; if (!stratumMiner.Authenticated) return false; if (!stratumMiner.Subscribed) return false; stratumMiner.SendJob(job); return true; }
public Account(IMiner miner) :this(-1, miner.Username, miner.Username) { }