Compare commits

...

6 Commits

Author SHA1 Message Date
b-rowan
35af74ad1a version: bump version number 2025-01-30 07:14:50 -07:00
Erik Olof Gunnar Andersson
15fa91fb98 bug: don’t timeout forever on _socket_ping (#288)
* Don't timeout forever on _socket_ping

* Use factory_get_timeout to configure number of allowed retries

* Add warning log
2025-01-30 07:05:29 -07:00
James Hilliard
084987a3e1 bug: Add cryptography direct dependency (#286) 2025-01-29 10:01:10 -07:00
b-rowan
e93cc77a58 ci: update pre-commit hooks 2025-01-28 21:29:43 -07:00
b-rowan
788d43c51c version: bump version number 2025-01-28 21:27:17 -07:00
Adrian
74c22b82ce bug: add miner algo type for S21 Hydro (#285) 2025-01-28 21:20:39 -07:00
5 changed files with 12 additions and 5 deletions

View File

@@ -23,11 +23,11 @@ repos:
exclude: ^mkdocs\.yml$
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 24.10.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.0
hooks:
- id: isort
name: isort (python)

2
poetry.lock generated
View File

@@ -1760,4 +1760,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.1"
python-versions = ">3.9, <4.0"
content-hash = "6f5bcdfff0891ee60759be4a2ccb175049706e174b041fd2b33b1e85afd1edba"
content-hash = "67a8e0d34c0d1af0f8e4d617d80fd5afc8d197e5d5444f78fd82e4f716a52965"

View File

@@ -38,6 +38,8 @@ class S21Pro(AntMinerMake):
class S21Hydro(AntMinerMake):
raw_model = MinerModel.ANTMINER.S21Hydro
expected_chips = 216
expected_hashboards = 2
expected_fans = 0
algo = MinerAlgo.SHA256

View File

@@ -888,6 +888,7 @@ class MinerFactory:
await writer.drain()
# loop to receive all the data
timeouts_remaining = max(1, int(settings.get("factory_get_timeout", 3)))
while True:
try:
d = await asyncio.wait_for(reader.read(4096), timeout=1)
@@ -895,7 +896,10 @@ class MinerFactory:
break
data += d
except asyncio.TimeoutError:
pass
timeouts_remaining -= 1
if not timeouts_remaining:
logger.warning(f"{ip}: Socket ping timeout.")
break
except ConnectionResetError:
return
except asyncio.CancelledError:

View File

@@ -1,6 +1,6 @@
[project]
name = "pyasic"
version = "0.70.4"
version = "0.70.6"
description = "A simplified and standardized interface for Bitcoin ASICs."
authors = [{name = "UpstreamData", email = "brett@upstreamdata.ca"}]
@@ -44,6 +44,7 @@ requires-python = ">3.9, <4.0"
dependencies = [
"httpx>=0.26.0",
"asyncssh>=2.17.0",
"cryptography>=39.0",
"passlib>=1.7.4",
"pyaml>=23.12.0",
"tomli (>=2.2.1,<3.0.0) ; python_version < '3.11'",