bug: fix some cases where bosminer config could be invalid
This commit is contained in:
@@ -82,6 +82,9 @@ class MiningModeNormal(MinerConfigValue):
|
|||||||
def as_luxos(self) -> dict:
|
def as_luxos(self) -> dict:
|
||||||
return {"autotunerset": {"enabled": False}}
|
return {"autotunerset": {"enabled": False}}
|
||||||
|
|
||||||
|
def as_bosminer(self) -> dict:
|
||||||
|
return {"autotuning": {"enabled": True}}
|
||||||
|
|
||||||
|
|
||||||
class MiningModeSleep(MinerConfigValue):
|
class MiningModeSleep(MinerConfigValue):
|
||||||
mode: str = field(init=False, default="sleep")
|
mode: str = field(init=False, default="sleep")
|
||||||
@@ -692,6 +695,7 @@ class MiningModeConfig(MinerConfigOption):
|
|||||||
return cls.hashrate_tuning(
|
return cls.hashrate_tuning(
|
||||||
scaling=ScalingConfig.from_bosminer(toml_conf, mode="hashrate"),
|
scaling=ScalingConfig.from_bosminer(toml_conf, mode="hashrate"),
|
||||||
)
|
)
|
||||||
|
return cls.default()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_vnish(cls, web_settings: dict, web_presets: list[dict]):
|
def from_vnish(cls, web_settings: dict, web_presets: list[dict]):
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ class Pool(MinerConfigValue):
|
|||||||
return cls(
|
return cls(
|
||||||
url=toml_pool_conf["url"],
|
url=toml_pool_conf["url"],
|
||||||
user=toml_pool_conf["user"],
|
user=toml_pool_conf["user"],
|
||||||
password=toml_pool_conf["password"],
|
password=toml_pool_conf.get("password", ""),
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user