From 6d9de87fb827326ef4abf8275aa2d58bae69d487 Mon Sep 17 00:00:00 2001 From: UpstreamData Date: Fri, 21 Jan 2022 16:30:26 -0700 Subject: [PATCH] changed bos get_bad_boards to be consistent with hive --- miners/antminer/T9/hive.py | 3 --- miners/bosminer.py | 10 +++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/miners/antminer/T9/hive.py b/miners/antminer/T9/hive.py index ce19508f..cfb8e7ec 100644 --- a/miners/antminer/T9/hive.py +++ b/miners/antminer/T9/hive.py @@ -1,7 +1,4 @@ -import asyncio - from miners.bmminer import BMMiner -import json class HiveonT9(BMMiner): diff --git a/miners/bosminer.py b/miners/bosminer.py index f7c63bf5..8da018de 100644 --- a/miners/bosminer.py +++ b/miners/bosminer.py @@ -112,13 +112,13 @@ class BOSMiner(BaseMiner): async def get_bad_boards(self) -> list: """Checks for and provides list of non working boards.""" devs = await self.api.devdetails() - bad = 0 + bad_boards = [] chains = devs['DEVDETAILS'] for chain in chains: - if chain['Chips'] == 0: - bad += 1 - if bad > 0: - return [str(self.ip), bad] + if not chain['Chips'] == 63: + bad_boards.append({"board": chain["ID"], "chain": chain["ID"], "chip_count": chain['Chips'], "chip_status": "o"*chain['Chips']}) + + return bad_boards async def check_good_boards(self) -> str: """Checks for and provides list for working boards."""