update metrics dataclass
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass, field
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
@@ -10,16 +10,16 @@ class PoolMetrics:
|
|||||||
rejected: Number of rejected shares.
|
rejected: Number of rejected shares.
|
||||||
get_failures: Number of failures in obtaining work from the pool.
|
get_failures: Number of failures in obtaining work from the pool.
|
||||||
remote_failures: Number of failures communicating with the pool server.
|
remote_failures: Number of failures communicating with the pool server.
|
||||||
stratum_active: Indicates if the miner is connected to the stratum server.
|
active: Indicates if the miner is connected to the stratum server.
|
||||||
pool_rejected_percent: Percentage of rejected shares by the pool.
|
pool_rejected_percent: Percentage of rejected shares by the pool.
|
||||||
pool_stale_percent: Percentage of stale shares by the pool.
|
pool_stale_percent: Percentage of stale shares by the pool.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
accepted: int
|
accepted: int = field(init=False)
|
||||||
rejected: int
|
rejected: int = field(init=False)
|
||||||
get_failures: int
|
get_failures: int = field(init=False)
|
||||||
remove_failures: int
|
remote_failures: int = field(init=False)
|
||||||
stratum_active: bool
|
stratum_active: bool = field(init=False)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def pool_rejected_percent(self) -> float:
|
def pool_rejected_percent(self) -> float:
|
||||||
|
|||||||
Reference in New Issue
Block a user