fix hammer test, enforce default hr unit

This commit is contained in:
John-Paul Compagnone
2025-01-02 17:41:43 -05:00
committed by Brett Rowan
parent 9ee52f77f9
commit 5236e02af2
2 changed files with 4 additions and 3 deletions

View File

@@ -229,7 +229,7 @@ class BlackMiner(StockFirmware):
hashrate = boards[1].get(f"chain_rate{i}")
if hashrate:
hashboard.hashrate = self.algo.hashrate(
rate=float(hashrate), unit=self.algo.unit.GH
rate=float(hashrate), unit=self.algo.unit.MH
).into(self.algo.unit.default)
chips = boards[1].get(f"chain_acn{i}")
@@ -358,7 +358,7 @@ class BlackMiner(StockFirmware):
try:
expected_rate = rpc_stats["STATS"][1].get("total_rateideal")
if expected_rate is None:
return self.sticker_hashrate
return self.sticker_hashrate.into(self.algo.unit.default)
try:
rate_unit = rpc_stats["STATS"][1]["rate_unit"]
except KeyError: