This commit is contained in:
John-Paul Compagnone
2024-05-13 21:22:31 -04:00
parent de5932184f
commit 7a09b66d4e

View File

@@ -300,22 +300,17 @@ class MiningModeHashrateTune(MinerConfigValue):
def as_epic(self) -> dict: def as_epic(self) -> dict:
## Ensures both backwards compatibility and vopt algos that don't have throttle ## Ensures both backwards compatibility and vopt algos that don't have throttle
if self.throttle_limit is None or self.throttle_step is None: mode = {
return {
"ptune": { "ptune": {
"algo": self.algo.as_epic(), "algo": self.algo.as_epic(),
"target": self.hashrate, "target": self.hashrate,
} }
} }
else: if self.throttle_limit is not None and self.throttle_step is not None:
return { mode["ptune"]["min_throttle"] = self.throttle_limit
"ptune": { mode["ptune"]["throttle_step"] = self.throttle_step
"algo": self.algo.as_epic(),
"target": self.hashrate, return mode
"min_throttle": self.throttle_limit,
"throttle_step": self.throttle_step,
}
}
def as_mara(self) -> dict: def as_mara(self) -> dict:
return { return {