Skip to content

StatsMod

Bases: Base

ORM model for the stats mod endpoint.

Attributes:

Name Type Description
uid int

Primary key.

time datetime

Timestamp of the record.

full_json dict

Full JSON data.

config dict

Configuration data.

ports dict

Ports data.

fee int

Fee.

min_payment_threshold int

Minimum payment threshold.

network dict

Network data.

height int

Network height.

pool dict

Pool data.

stats dict

Stats data.

last_block_found str

Last block found.

blocks dict

Blocks data.

miners int

Number of miners.

hashrate int

Hashrate.

round_hashes int

Round hashes.

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

    Attributes:
        uid (int): Primary key.
        time (datetime): Timestamp of the record.
        full_json (dict): Full JSON data.
        config (dict): Configuration data.
        ports (dict): Ports data.
        fee (int): Fee.
        min_payment_threshold (int): Minimum payment threshold.
        network (dict): Network data.
        height (int): Network height.
        pool (dict): Pool data.
        stats (dict): Stats data.
        last_block_found (str): Last block found.
        blocks (dict): Blocks data.
        miners (int): Number of miners.
        hashrate (int): Hashrate.
        round_hashes (int): Round hashes.
    """
    __tablename__ = 'stats_mod'
    uid = Column(Integer, primary_key=True)
    time = Column(DateTime, default=datetime.now)
    full_json = Column(JSON)
    config = Column(JSON)
    ports = Column(JSON)
    fee = Column(Integer)
    min_payment_threshold = Column(Integer)
    network = Column(JSON)
    height = Column(Integer)
    pool = Column(JSON)
    stats = Column(JSON)
    last_block_found = Column(String)
    blocks = Column(JSON)
    miners = Column(Integer)
    hashrate = Column(Integer)
    round_hashes = Column(Integer)