예제 #1
0
        private async Task <object> StartAsync(CancellationToken stop, string miningLocation, string username)
        {
            _miner.InitMiningLocationAndUsername(miningLocation, username);
            _miner.InitMiningPairs(_miningPairs);
            EthlargementIntegratedPlugin.Instance.Start(_miningPairs);
            var ret = await _miner.StartMiningTask(stop);

            var maxTimeout = _plugin.GetApiMaxTimeout(_miningPairs);

            MinerApiWatchdog.AddGroup(GroupKey, maxTimeout, DateTime.UtcNow);
            _algos.ForEach(a => a.IsCurrentlyMining = true);
            return(ret);
        }
예제 #2
0
        private async Task <object> StartAsync(CancellationToken stop, string username)
        {
            _miner.InitMiningLocationAndUsername("auto", username);
            _miner.InitMiningPairs(_miningPairs);
            GPUProfileManager.Instance.Start(_miningPairs);
            var ret = await _miner.StartMiningTask(stop);

            var maxTimeout = _plugin.GetApiMaxTimeout(_miningPairs);

            MinerApiWatchdog.AddGroup(GroupKey, maxTimeout, DateTime.UtcNow);
            _algos.ForEach(a => a.IsCurrentlyMining   = true);
            _algos.ForEach(a => a.ComputeDevice.State = DeviceState.Mining);
            return(ret);
        }
예제 #3
0
        // TODO this thing
        public void Start(string miningLocation, string username)
        {
            if (_isEnded)
            {
                return;
            }
            _miner.InitMiningLocationAndUsername(miningLocation, username);
            _miner.InitMiningPairs(MiningPairs);
            EthlargementIntegratedPlugin.Instance.Start(MiningPairs);
            _miner.StartMining();
            IsRunning = true;
            // maxTimeout = ConfigManager.GeneralConfig.CoolDownCheckEnabled
            var maxTimeout = _plugin.GetApiMaxTimeout(MiningPairs);

            MinerApiWatchdog.AddGroup(GroupKey, maxTimeout, DateTime.UtcNow);
        }