updated some formatting and improved pool return format

This commit is contained in:
UpstreamData
2022-05-05 13:02:00 -06:00
parent ac3ff7a63e
commit 801cfc4ff8
7 changed files with 51 additions and 33 deletions

View File

@@ -152,7 +152,7 @@ class BMMiner(BaseMiner):
hr = summary.get("SUMMARY")
if hr:
if len(hr) > 0:
hr = hr[0].get("GHS av")
hr = hr[0].get("GHS 5s")
if hr:
data["Hashrate"] = round(hr / 1000, 2)
@@ -191,6 +191,10 @@ class BMMiner(BaseMiner):
quota = f"{pool_1_quota}/{pool_2_quota}"
if pool_1:
if pool_1.startswith("stratum+tcp://"):
pool_1.replace("stratum+tcp://", "")
if pool_1.startswith("stratum2+tcp://"):
pool_1.replace("stratum2+tcp://", "")
data["Pool 1"] = pool_1
if pool_1_user:
@@ -198,6 +202,10 @@ class BMMiner(BaseMiner):
data["Pool User"] = pool_1_user
if pool_2:
if pool_2.startswith("stratum+tcp://"):
pool_2.replace("stratum+tcp://", "")
if pool_2.startswith("stratum2+tcp://"):
pool_2.replace("stratum2+tcp://", "")
data["Pool 2"] = pool_2
if pool_2_user: