Skip to content

Miner alerts should not import-crash on malformed numeric env #7323

Description

@yyswhsccc

Summary

tools/miner_alerts/miner_alerts.py parses several numeric environment variables at module import time with direct int(...) / float(...) calls.

Malformed values for POLL_INTERVAL, OFFLINE_THRESHOLD, LARGE_TRANSFER_THRESHOLD, or SMTP_PORT can crash the alert daemon during import before it can start or log useful runtime behavior.

Impact

A typo in miner alert configuration can prevent the whole alerting tool from loading, which is avoidable because the script already has safe defaults for those values.

Expected

Missing, empty, or malformed numeric environment values should fall back to existing defaults without changing valid configuration behavior.

Scope

Small miner-alert tooling hardening only. No node, wallet, transfer, reward, payout, admin-key, or production behavior changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriagedReviewed and categorized

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions