Skip to content

NetworkStats

Bases: Base

ORM model for the network stats endpoint.

Attributes:

Name Type Description
uid int

Primary key.

time datetime

Timestamp of the record.

full_json dict

Full JSON data.

difficulty int

Network difficulty.

hash_value str

Network hash value.

height int

Network height.

reward int

Network reward.

timestamp int

Network timestamp.

Source code in p2pool/models.py
class NetworkStats(Base):
    """
    ORM model for the network stats endpoint.

    Attributes:
        uid (int): Primary key.
        time (datetime): Timestamp of the record.
        full_json (dict): Full JSON data.
        difficulty (int): Network difficulty.
        hash_value (str): Network hash value.
        height (int): Network height.
        reward (int): Network reward.
        timestamp (int): Network timestamp.
    """
    __tablename__ = 'network_stats'
    uid = Column(Integer, primary_key=True)
    time = Column(DateTime, default=datetime.now)
    full_json = Column(JSON)
    difficulty = Column(Integer)
    hash_value = Column(String)
    height = Column(Integer)
    reward = Column(Integer)
    timestamp = Column(Integer)