Commit 9f82f7b
committed
web: report real c2pool peer count + pool hashrate in getinfo/getstats
getinfo() and getstats() read connections and poolhashps from the
m_node accessors. In the embedded prod build m_node is the unpopulated
enhanced_node stub whose get_connected_peers_count()/get_hashrate_stats()
return 0, so the dashboard/API showed connections=0 and poolhashps=0
even with ~30 LTC peers and ~129 GH/s live -- two false no-peers/0-hashrate
alarms.
Prefer the live MiningInterface hooks (m_peer_info_fn for real c2pool
share peers, m_pool_hashrate_fn for real attempts/s from the tracker)
which are already wired in c2pool_refactored.cpp and consumed by
rest_local_stats. Fall back to the m_node accessors when a hook is unset.
Web/diagnostic layer only -- no consensus, sharechain, or wire change.1 parent c37ec37 commit 9f82f7b
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2837 | 2837 | | |
2838 | 2838 | | |
2839 | 2839 | | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
2840 | 2852 | | |
2841 | 2853 | | |
2842 | 2854 | | |
| |||
2895 | 2907 | | |
2896 | 2908 | | |
2897 | 2909 | | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
2898 | 2918 | | |
2899 | 2919 | | |
2900 | 2920 | | |
| |||
0 commit comments