Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
934d469def | ||
|
|
0c563ef538 | ||
|
|
ecc76d09af | ||
|
|
caa66531b7 | ||
|
|
23ea90b56f | ||
|
|
9e2d3aeebd | ||
|
|
0cead26872 |
26
pyasic/miners/btc/_types/antminer/X9/S9j.py
Normal file
26
pyasic/miners/btc/_types/antminer/X9/S9j.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright 2022 Upstream Data Inc -
|
||||
# -
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); -
|
||||
# you may not use this file except in compliance with the License. -
|
||||
# You may obtain a copy of the License at -
|
||||
# -
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 -
|
||||
# -
|
||||
# Unless required by applicable law or agreed to in writing, software -
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, -
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
|
||||
# See the License for the specific language governing permissions and -
|
||||
# limitations under the License. -
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
from pyasic.miners.makes import AntMiner
|
||||
|
||||
|
||||
class S9j(AntMiner): # noqa - ignore ABC method implementation
|
||||
def __init__(self, ip: str, api_ver: str = "0.0.0"):
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "S9j"
|
||||
self.nominal_chips = 63
|
||||
self.fan_count = 2
|
||||
@@ -16,4 +16,5 @@
|
||||
|
||||
from .S9 import S9
|
||||
from .S9i import S9i
|
||||
from .S9j import S9j
|
||||
from .T9 import T9
|
||||
|
||||
@@ -120,10 +120,7 @@ class M31SVE10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M31S VE10"
|
||||
self.nominal_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M31SVE10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
)
|
||||
self.nominal_chips = 70
|
||||
self.fan_count = 2
|
||||
|
||||
|
||||
|
||||
@@ -24,10 +24,7 @@ class M32V10(WhatsMiner): # noqa - ignore ABC method implementation
|
||||
super().__init__(ip, api_ver)
|
||||
self.ip = ip
|
||||
self.model = "M32 V10"
|
||||
self.nominal_chips = 0
|
||||
warnings.warn(
|
||||
"Unknown chip count for miner type M32V10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
|
||||
)
|
||||
self.nominal_chips = 74
|
||||
self.fan_count = 2
|
||||
|
||||
|
||||
|
||||
22
pyasic/miners/btc/antminer/bmminer/X9/S9j.py
Normal file
22
pyasic/miners/btc/antminer/bmminer/X9/S9j.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Copyright 2022 Upstream Data Inc -
|
||||
# -
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); -
|
||||
# you may not use this file except in compliance with the License. -
|
||||
# You may obtain a copy of the License at -
|
||||
# -
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 -
|
||||
# -
|
||||
# Unless required by applicable law or agreed to in writing, software -
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, -
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
|
||||
# See the License for the specific language governing permissions and -
|
||||
# limitations under the License. -
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
from pyasic.miners.backends import BMMiner
|
||||
from pyasic.miners.btc._types import S9j # noqa - Ignore access to _module
|
||||
|
||||
|
||||
class BMMinerS9j(BMMiner, S9j):
|
||||
pass
|
||||
@@ -16,4 +16,5 @@
|
||||
|
||||
from .S9 import BMMinerS9
|
||||
from .S9i import BMMinerS9i
|
||||
from .S9j import BMMinerS9j
|
||||
from .T9 import BMMinerT9
|
||||
|
||||
@@ -18,8 +18,7 @@ import asyncio
|
||||
import ipaddress
|
||||
import json
|
||||
import logging
|
||||
from collections.abc import AsyncIterable
|
||||
from typing import List, Tuple, Union
|
||||
from typing import AsyncIterable, List, Tuple, Union
|
||||
|
||||
import asyncssh
|
||||
import httpx
|
||||
@@ -83,6 +82,10 @@ MINER_CLASSES = {
|
||||
"Default": BMMinerS9i,
|
||||
"BMMiner": BMMinerS9i,
|
||||
},
|
||||
"ANTMINER S9J": {
|
||||
"Default": BMMinerS9j,
|
||||
"BMMiner": BMMinerS9j,
|
||||
},
|
||||
"ANTMINER T9": {
|
||||
"Default": BMMinerT9,
|
||||
"BMMiner": BMMinerT9,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pyasic"
|
||||
version = "0.33.12"
|
||||
version = "0.33.15"
|
||||
description = "A set of modules for interfacing with many common types of ASIC bitcoin miners, using both their API and SSH."
|
||||
authors = ["UpstreamData <brett@upstreamdata.ca>"]
|
||||
repository = "https://github.com/UpstreamData/pyasic"
|
||||
|
||||
@@ -69,13 +69,6 @@ class NetworkTest(unittest.TestCase):
|
||||
self.assertTrue(net_1 == correct_net)
|
||||
self.assertTrue(net_2 == correct_net)
|
||||
|
||||
def test_net_len(self):
|
||||
net = MinerNetwork("192.168.1.0", mask=32)
|
||||
self.assertEqual(len(net), 1)
|
||||
|
||||
net2 = MinerNetwork("192.168.1.0", mask=31)
|
||||
self.assertEqual(len(net2), 2)
|
||||
|
||||
def test_net_defaults(self):
|
||||
net = MinerNetwork()
|
||||
net_obj = net.get_network()
|
||||
|
||||
Reference in New Issue
Block a user