From 91902f38a0b702d243cd28ea7367038898d32faf Mon Sep 17 00:00:00 2001 From: satoshi Date: Fri, 24 Apr 2026 01:34:04 +0300 Subject: [PATCH] Unify best-share semantics across leaderboard / miners / user page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BestShares read worker.bestdiff for its "Best (round)" column, while MinersTable used client.bestdiff for online workers (and worker.bestdiff only as a fallback for offline ones). ckpool resets *both* fields in reset_bestshares() when the pool finds a block, but reconnect / timing can leave them briefly divergent, so the same worker could show different values in the two tables. Switch every "session best" display to the same computation: max(client.bestdiff, worker.bestdiff) …picking whichever is currently higher. Relabel the column from "Best (round)" to "Best (session)" in MinersTable, BestShares, and UserDetailPage so the meaning matches the value. UserDetailPage's per-user summary tile used to show the user's round-best as a sub-line; drop it, since it contradicts the "session" framing at the row level. Net effect: scroll between the leaderboard and the miners table and the same worker's best-share number stays put. --- ui/src/lib/BestShares.svelte | 35 ++++++++++++++++++++++---------- ui/src/lib/MinersTable.svelte | 12 ++++++++--- ui/src/lib/UserDetailPage.svelte | 11 +++++++--- 3 files changed, 41 insertions(+), 17 deletions(-) diff --git a/ui/src/lib/BestShares.svelte b/ui/src/lib/BestShares.svelte index 5f8ca63..a694ef2 100644 --- a/ui/src/lib/BestShares.svelte +++ b/ui/src/lib/BestShares.svelte @@ -1,18 +1,31 @@