detect if hashrate in hs -> khs

This commit is contained in:
clore 2024-09-12 00:39:00 +00:00
parent 36c7db5831
commit 7ec35382b2
1 changed files with 3 additions and 0 deletions

View File

@ -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)):