Browse Source

Add stale shares stats to Web-UI

pool
Sammy Libre 8 years ago
parent
commit
0dff9c0845
  1. 1
      go-pool/stratum/api.go
  2. 2
      www/index.html

1
go-pool/stratum/api.go

@ -81,6 +81,7 @@ func (s *StratumServer) collectMinersStats() (float64, float64, int, []interface @@ -81,6 +81,7 @@ func (s *StratumServer) collectMinersStats() (float64, float64, int, []interface
stats["hashrate24h"] = hashrate24h
stats["lastBeat"] = lastBeat
stats["validShares"] = atomic.LoadUint64(&m.Val.validShares)
stats["staleShares"] = atomic.LoadUint64(&m.Val.staleShares)
stats["invalidShares"] = atomic.LoadUint64(&m.Val.invalidShares)
stats["accepts"] = atomic.LoadUint64(&m.Val.accepts)
stats["rejects"] = atomic.LoadUint64(&m.Val.rejects)

2
www/index.html

@ -108,6 +108,7 @@ @@ -108,6 +108,7 @@
<th>HR 24h</th>
<th>Last Beat</th>
<th>Accepted</th>
<th>Stale</th>
<th>Rejected</th>
<th>Blocks Accepted</th>
<th>Blocks Rejected</th>
@ -134,6 +135,7 @@ @@ -134,6 +135,7 @@
<td>{{formatNumber hashrate24h maximumFractionDigits=4}}</td>
<td>{{formatRelative lastBeat now=../now}}</td>
<td>{{formatNumber validShares}}</td>
<td>{{formatNumber staleShares}}</td>
<td><strong>{{formatNumber invalidShares}}</strong></td>
<td>{{formatNumber accepts}}</td>
<td>{{formatNumber rejects}}</td>

Loading…
Cancel
Save