Add node peers, blue banners, glowing diff ranges, fix back navigation

- Show Bitcoin Core peer count on block height card (hover for in/out)
- BestSharePage disclaimers now use solid blue styling
- Difficulty distribution ranges glow from warm peach to deep red
- Back-to-dashboard buttons always navigate to dashboard instead of
  using browser history
This commit is contained in:
satoshi
2026-05-19 02:34:15 +03:00
parent daa87e2352
commit e341fd7b26
7 changed files with 73 additions and 21 deletions
+12
View File
@@ -98,6 +98,11 @@ type Snapshot struct {
HasLastZMQEvent bool `json:"has_last_zmq_event"`
TipChangedAge float64 `json:"tip_changed_age"` // seconds since tip height last changed
// Bitcoin Core peer connections.
PeerCount int `json:"peer_count"`
PeersIn int `json:"peers_in"`
PeersOut int `json:"peers_out"`
// Share counters: raw counts (1 submission = 1 share regardless of diff).
// Session = since ckpool started; AllTime = persisted across restarts.
SessionAccepted int64 `json:"session_accepted"`
@@ -460,6 +465,13 @@ func (a *Aggregator) refresh(ctx context.Context) {
}
}
// --- bitcoind: peer connections ---
if ni, err := a.RPC.GetNetworkInfo(ctx); err == nil {
next.PeerCount = ni.Connections
next.PeersIn = ni.ConnectionsIn
next.PeersOut = ni.ConnectionsOut
}
// --- predicted difficulty adjustment ---
// Fetch the timestamp of the first block in the current retarget
// epoch (height - height%2016) once per epoch and cache it, then