From 7ec35382b226277d5679dd4e94c823ae470b6414 Mon Sep 17 00:00:00 2001 From: clore Date: Thu, 12 Sep 2024 00:39:00 +0000 Subject: [PATCH] detect if hashrate in hs -> khs --- lib/hive_miner_interface.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/hive_miner_interface.py b/lib/hive_miner_interface.py index 3604b6a..df6972e 100644 --- a/lib/hive_miner_interface.py +++ b/lib/hive_miner_interface.py @@ -166,6 +166,9 @@ class hive_interface: if key[:2]=="hs" and (key=="hs" or key[2:].isdigit()): all_hs = sum_numbers_in_list(miner_stats[key]) try: + if "hs_units" in miner_stats: + if miner_stats["hs_units"]=="hs": + all_hs = all_hs/1000 if not "hashrates" in output['miners'][miner_names[idx]]: output['miners'][miner_names[idx]]["hashrates"]=[] if isinstance(all_hs, (float, int)):