fixed some small bugs with miner factory
This commit is contained in:
@@ -94,7 +94,10 @@ class MinerFactory:
|
|||||||
if "Antminer S9" in model:
|
if "Antminer S9" in model:
|
||||||
|
|
||||||
# handle the different API types
|
# handle the different API types
|
||||||
if "BOSMiner" in api:
|
if not api:
|
||||||
|
print(ip)
|
||||||
|
miner = BOSMinerS9(str(ip))
|
||||||
|
elif "BOSMiner" in api:
|
||||||
miner = BOSMinerS9(str(ip))
|
miner = BOSMinerS9(str(ip))
|
||||||
elif "CGMiner" in api:
|
elif "CGMiner" in api:
|
||||||
miner = CGMinerS9(str(ip))
|
miner = CGMinerS9(str(ip))
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ from network import MinerNetwork
|
|||||||
from miners.bosminer import BOSMiner
|
from miners.bosminer import BOSMiner
|
||||||
|
|
||||||
|
|
||||||
async def get_bos_bad_tuners():
|
async def get_bos_bad_tuners(ip: str = "192.168.1.0", mask: int = 24):
|
||||||
# create a miner network
|
# create a miner network
|
||||||
miner_network = MinerNetwork("192.168.1.0")
|
miner_network = MinerNetwork(ip, mask=mask)
|
||||||
|
|
||||||
# scan for miners
|
# scan for miners
|
||||||
miners = await miner_network.scan_network_for_miners()
|
miners = await miner_network.scan_network_for_miners()
|
||||||
@@ -29,7 +29,7 @@ async def get_bos_bad_tuners():
|
|||||||
bad_boards = []
|
bad_boards = []
|
||||||
for board in item["tuner_status"]:
|
for board in item["tuner_status"]:
|
||||||
# if its not stable or still testing, its bad
|
# if its not stable or still testing, its bad
|
||||||
if board["status"] not in ["Stable", "Testing performance profile"]:
|
if board["status"] not in ["Stable", "Testing performance profile", "Tuning individual chips"]:
|
||||||
# remove the part about the board refusing to start
|
# remove the part about the board refusing to start
|
||||||
bad_boards.append({"board": board["board"],
|
bad_boards.append({"board": board["board"],
|
||||||
"error": board["status"].replace("Hashchain refused to start: ", "")})
|
"error": board["status"].replace("Hashchain refused to start: ", "")})
|
||||||
|
|||||||
Reference in New Issue
Block a user