Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/next'
Browse files Browse the repository at this point in the history
  • Loading branch information
YoRyan committed Oct 12, 2019
2 parents 4d29740 + 11ee9b2 commit 946c4c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions nuxhash/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
BENCHMARK_SECS = 60
DONATE_PROB = 0.005
DONATE_ADDRESS = '3DJBpNcgP3Pihw45p9544PK6TbbYeMcnk7'
NH_EXCEPTIONS = (ConnectionError, IOError, OSError, nicehash.NicehashException)


def main():
Expand Down Expand Up @@ -233,6 +232,7 @@ class MiningSession(object):

PROFIT_PRIORITY = 1
STOP_PRIORITY = 0
NH_EXCEPTIONS = (ConnectionError, IOError, OSError, nicehash.NicehashException)

def __init__(self, miners, settings, benchmarks, devices):
self._miners = miners
Expand All @@ -254,7 +254,7 @@ def run(self):
try:
payrates = nicehash.simplemultialgo_info(self._settings)
stratums = nicehash.stratums(self._settings)
except NH_EXCEPTIONS as err:
except MiningSession.NH_EXCEPTIONS as err:
logging.warning(f'NiceHash stats: {err}, retrying in 5 seconds')
time.sleep(5)
else:
Expand All @@ -279,7 +279,7 @@ def _switch_algos(self):
# Get profitability information from NiceHash.
try:
ret_payrates = nicehash.simplemultialgo_info(self._settings)
except NH_EXCEPTIONS as err:
except MiningSession.NH_EXCEPTIONS as err:
logging.warning('NiceHash stats: %s' % err)
else:
self._payrates = (ret_payrates, datetime.now())
Expand Down
6 changes: 3 additions & 3 deletions nuxhash/gui/mining.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
BALANCE_UPDATE_MIN = 5
NVIDIA_COLOR = (66, 244, 69)
DONATE_PROB = 0.005
NH_EXCEPTIONS = (ConnectionError, IOError, OSError, nicehash.NicehashException)


class MiningScreen(wx.Panel):
Expand Down Expand Up @@ -301,6 +300,7 @@ class MiningThread(threading.Thread):
PROFIT_PRIORITY = 1
STATUS_PRIORITY = 2
STOP_PRIORITY = 0
NH_EXCEPTIONS = (ConnectionError, IOError, OSError, nicehash.NicehashException)

def __init__(self, devices=[], window=None,
settings=DEFAULT_SETTINGS, benchmarks=EMPTY_BENCHMARKS):
Expand All @@ -321,7 +321,7 @@ def run(self):
try:
payrates = nicehash.simplemultialgo_info(self._settings)
stratums = nicehash.stratums(self._settings)
except NH_EXCEPTIONS as err:
except MiningThread.NH_EXCEPTIONS as err:
logging.warning(f'NiceHash stats: {err}, retrying in 5 seconds')
time.sleep(5)
else:
Expand Down Expand Up @@ -349,7 +349,7 @@ def _switch_algos(self):
# Get profitability information from NiceHash.
try:
ret_payrates = nicehash.simplemultialgo_info(self._settings)
except NH_EXCEPTIONS as err:
except MiningThread.NH_EXCEPTIONS as err:
logging.warning('NiceHash stats: %s' % err)
else:
self._payrates = (ret_payrates, datetime.now())
Expand Down

0 comments on commit 946c4c9

Please sign in to comment.