diff --git a/AVR_Miner.py b/AVR_Miner.py index cf21d424..c9d8ed3c 100644 --- a/AVR_Miner.py +++ b/AVR_Miner.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -Duino-Coin Official AVR Miner 2.74 © MIT licensed +Duino-Coin Official AVR Miner 2.75 © MIT licensed https://duinocoin.com https://github.com/revoxhere/duino-coin Duino-Coin Team & Community 2019-2021 @@ -93,9 +93,9 @@ def port_num(com): class Settings: - VER = '2.74' - SOC_TIMEOUT = 45 - REPORT_TIME = 60 + VER = '2.75' + SOC_TIMEOUT = 15 + REPORT_TIME = 120 AVR_TIMEOUT = 4 # diff 6 * 100 / 196 h/s = 3.06 BAUDRATE = 115200 DATA_DIR = "Duino-Coin AVR Miner " + str(VER) @@ -134,7 +134,8 @@ def fetch_pool(): "warning") try: response = requests.get( - "https://server.duinocoin.com/getPool").json() + "https://server.duinocoin.com/getPool", + timeout=5).json() if response["success"] == True: NODE_ADDRESS = response["ip"] NODE_PORT = response["port"] @@ -162,7 +163,7 @@ def load(donation_level): f"{Settings.DATA_DIR}/Donate.exe").is_file(): url = ('https://server.duinocoin.com/' + 'donations/DonateExecutableWindows.exe') - r = requests.get(url) + r = requests.get(url, timeout=10) with open(f"{Settings.DATA_DIR}/Donate.exe", 'wb') as f: f.write(r.content) @@ -178,7 +179,7 @@ def load(donation_level): + 'donations/DonateExecutableLinux') if not Path( f"{Settings.DATA_DIR}/Donate").is_file(): - r = requests.get(url) + r = requests.get(url, timeout=10) with open(f"{Settings.DATA_DIR}/Donate", "wb") as f: f.write(r.content) @@ -235,7 +236,7 @@ def start(donation_level): + 'revoxhere/' + 'duino-coin/master/Resources/' + 'AVR_Miner_langs.json') - r = requests.get(url) + r = requests.get(url, timeout=5) with open(Settings.DATA_DIR + '/Translations.json', 'wb') as f: f.write(r.content) @@ -675,7 +676,7 @@ def mine_avr(com, threadid, fastest_pool): try: ser.close() pretty_print('sys' + port_num(com), - f"Closed COM port {com}", 'success') + f"Closed COM port {com}", 'success') sleep(2) except: pass @@ -956,8 +957,8 @@ def calculate_uptime(start_time): threadid = 0 for port in avrport: Thread(target=mine_avr, - args=(port, threadid, - fastest_pool)).start() + args=(port, threadid, + fastest_pool)).start() threadid += 1 except Exception as e: debug_output(f'Error launching AVR thread(s): {e}')