less lines

This commit is contained in:
John-Paul Compagnone
2024-05-13 23:51:23 -04:00
parent 66bae47bb9
commit d31bafbc0e

View File

@@ -432,14 +432,14 @@ class MiningModeConfig(MinerConfigOption):
if tuner_running: if tuner_running:
algo_info = web_conf["PerpetualTune"]["Algorithm"] algo_info = web_conf["PerpetualTune"]["Algorithm"]
if algo_info.get("VoltageOptimizer") is not None: if algo_info.get("VoltageOptimizer") is not None:
throttle_limit = algo_info["VoltageOptimizer"].get(
"Min Throttle Target"
)
throttle_step = algo_info["VoltageOptimizer"].get("Throttle Step")
return cls.hashrate_tuning( return cls.hashrate_tuning(
hashrate=algo_info["VoltageOptimizer"]["Target"], hashrate=algo_info["VoltageOptimizer"]["Target"],
throttle_limit=throttle_limit, throttle_limit=algo_info["VoltageOptimizer"].get(
throttle_step=throttle_step, "Min Throttle Target"
),
throttle_step=algo_info["VoltageOptimizer"].get(
"Throttle Step"
),
algo=TunerAlgo.voltage_optimizer, algo=TunerAlgo.voltage_optimizer,
) )
else: else: