mirror of
https://github.com/kvazar-network/keva-stratum.git
synced 2025-01-26 23:04:42 +00:00
Add prev block hash to stats
This commit is contained in:
parent
7f609a8b59
commit
51c9f28c4b
@ -42,6 +42,7 @@ func (s *StratumServer) StatsIndex(w http.ResponseWriter, r *http.Request) {
|
||||
stats["diff"] = t.Difficulty
|
||||
roundShares := atomic.LoadInt64(&s.roundShares)
|
||||
stats["variance"] = float64(roundShares) / float64(t.Difficulty)
|
||||
stats["prevHash"] = t.PrevHash[0:8]
|
||||
stats["template"] = true
|
||||
}
|
||||
json.NewEncoder(w).Encode(stats)
|
||||
|
@ -48,8 +48,9 @@
|
||||
<div class="col-xs-12">
|
||||
{{#if template}}
|
||||
<p>
|
||||
<strong>Block height:</strong> <span class="label label-primary">{{height}}</span>
|
||||
<strong>Block Height:</strong> <span class="label label-primary">{{height}}</span>
|
||||
<strong>Difficulty:</strong> <span class="label label-primary">{{formatNumber diff maximumFractionDigits=4}}</span>
|
||||
<strong>PrevHash:</strong> <span class="label label-primary">{{prevHash}}</span>
|
||||
</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user