add sticker_hashrate for D10
This commit is contained in:
committed by
Brett Rowan
parent
b903cc6e5f
commit
2019bdaff2
@@ -51,6 +51,7 @@ class MinerData(BaseModel):
|
|||||||
hostname: The network hostname of the miner as a str.
|
hostname: The network hostname of the miner as a str.
|
||||||
hashrate: The hashrate of the miner in TH/s as a float. Calculated automatically.
|
hashrate: The hashrate of the miner in TH/s as a float. Calculated automatically.
|
||||||
expected_hashrate: The factory nominal hashrate of the miner in TH/s as a float.
|
expected_hashrate: The factory nominal hashrate of the miner in TH/s as a float.
|
||||||
|
sticker_hashrate: The factory sticker hashrate of the miner as a float.
|
||||||
hashboards: A list of [`HashBoard`][pyasic.data.HashBoard]s on the miner with their statistics.
|
hashboards: A list of [`HashBoard`][pyasic.data.HashBoard]s on the miner with their statistics.
|
||||||
temperature_avg: The average temperature across the boards. Calculated automatically.
|
temperature_avg: The average temperature across the boards. Calculated automatically.
|
||||||
env_temp: The environment temps as a float.
|
env_temp: The environment temps as a float.
|
||||||
@@ -90,6 +91,9 @@ class MinerData(BaseModel):
|
|||||||
# hashrate
|
# hashrate
|
||||||
raw_hashrate: AlgoHashRateType = Field(exclude=True, default=None, repr=False)
|
raw_hashrate: AlgoHashRateType = Field(exclude=True, default=None, repr=False)
|
||||||
|
|
||||||
|
# sticker
|
||||||
|
sticker_hashrate: AlgoHashRateType | None = None
|
||||||
|
|
||||||
# expected
|
# expected
|
||||||
expected_hashrate: AlgoHashRateType | None = None
|
expected_hashrate: AlgoHashRateType | None = None
|
||||||
expected_hashboards: int | None = None
|
expected_hashboards: int | None = None
|
||||||
|
|||||||
@@ -356,7 +356,9 @@ class BlackMiner(StockFirmware):
|
|||||||
|
|
||||||
if rpc_stats is not None:
|
if rpc_stats is not None:
|
||||||
try:
|
try:
|
||||||
expected_rate = self.expected_hashrate
|
expected_rate = rpc_stats["STATS"][1].get("total_rateideal")
|
||||||
|
if expected_rate is None:
|
||||||
|
expected_rate = self.sticker_hashrate
|
||||||
try:
|
try:
|
||||||
rate_unit = rpc_stats["STATS"][1]["rate_unit"]
|
rate_unit = rpc_stats["STATS"][1]["rate_unit"]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ from pyasic.miners.device.models import D10
|
|||||||
|
|
||||||
|
|
||||||
class HammerD10(BlackMiner, D10):
|
class HammerD10(BlackMiner, D10):
|
||||||
expected_hashrate = 5000
|
sticker_hashrate = 5000
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user