make miner ips a true ip address, and allow sorting miners using __lt__ and __gt__

This commit is contained in:
UpstreamData
2022-05-18 11:34:39 -06:00
parent 8ebcbd3c33
commit 8cbf3a20a3
8 changed files with 61 additions and 54 deletions

View File

@@ -2,12 +2,13 @@ from API.bmminer import BMMinerAPI
from miners import BaseMiner
import logging
from settings import MINER_FACTORY_GET_VERSION_RETRIES as DATA_RETRIES
import ipaddress
class BMMiner(BaseMiner):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.ip = ip
self.ip = ipaddress.ip_address(ip)
self.api = BMMinerAPI(ip)
self.api_type = "BMMiner"
self.uname = "root"