public MinerResourceMonitor( MiddlewareServer server) { Debug.Assert(server != null); this.server = server; }
Miner() { settings = new Settings(); middlewareServer = new MiddlewareServer(); minerAutoStart = new MinerAutoStart(); bitcoinPrice = new APIBitcoinPrice(); miningPriceList = new APINiceHashMiningPriceList(); changeWalletTimer.Elapsed += ChangeWalletTimer_OnTick; refreshNetworkAPI.Elapsed += RefreshNetworkAPIsIfCooldown; refreshNetworkAPI.AutoReset = false; RefreshNetworkAPIsIfCooldown(null, null); monitor = new MinerResourceMonitor(settings.minerConfig); }
public MinerRegionMonitor( MiddlewareServer middlewareServer) { regionList.Add(new Region("cryptonight.usa.nicehash.com", 3355)); regionList.Add(new Region("cryptonight.eu.nicehash.com", 3355)); regionList.Add(new Region("cryptonight.hk.nicehash.com", 3355)); regionList.Add(new Region("cryptonight.jp.nicehash.com", 3355)); regionList.Add(new Region("cryptonight.in.nicehash.com", 3355)); regionList.Add(new Region("cryptonight.br.nicehash.com", 3355)); pingRegionsTimer.AutoReset = false; pingRegionsTimer.Elapsed += PingRegionsTimer_Elapsed; pingRegionsTimer.Start(); middlewareServer.onWorkIsStalled += MiddlewareServer_onWorkIsStalled; }