bug: add default case for work mode when there is no work mode returned from bitmain.

This commit is contained in:
UpstreamData
2023-12-11 15:08:57 -07:00
parent f6b0b64d86
commit 6941d9f349

View File

@@ -176,6 +176,8 @@ class MiningModeConfig(MinerConfigOption):
def from_am_modern(cls, web_conf: dict):
if web_conf.get("bitmain-work-mode") is not None:
work_mode = web_conf["bitmain-work-mode"]
if work_mode == "":
return cls.default()
if int(work_mode) == 0:
return cls.normal()
elif int(work_mode) == 1: