Add best share analysis page, miner column, and UI improvements
- Best share page: hex + binary hash comparison against network target, per-bit coloring showing exactly which bits prevented a valid block, toggle between network diff at time of finding vs current diff - Capture best share hash from ckpool logs with one-time backfill - Persist network difficulty at time of best share for historical accuracy - Add miner (worker) column to blocks table via coinbase address matching - Truncate block hashes in table with full hash on hover - Increase hashrate chart Y-axis to 7 ticks for better readability
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
const USER_PREFIX = "#/user/";
|
||||
const WORKER_PREFIX = "#/worker/";
|
||||
const ACCELERATOR_HASH = "#/accelerator";
|
||||
const STATS_HASH = "#/stats";
|
||||
const BESTSHARE_HASH = "#/bestshare";
|
||||
|
||||
type Selection = { user: string | null; worker: string | null; page: string | null };
|
||||
|
||||
@@ -23,6 +25,12 @@ function readHash(): Selection {
|
||||
if (h === ACCELERATOR_HASH) {
|
||||
return { user: null, worker: null, page: "accelerator" };
|
||||
}
|
||||
if (h === STATS_HASH) {
|
||||
return { user: null, worker: null, page: "stats" };
|
||||
}
|
||||
if (h === BESTSHARE_HASH) {
|
||||
return { user: null, worker: null, page: "bestshare" };
|
||||
}
|
||||
if (h.startsWith(WORKER_PREFIX)) {
|
||||
const w = decodeURIComponent(h.slice(WORKER_PREFIX.length));
|
||||
return { user: null, worker: w || null, page: null };
|
||||
@@ -57,12 +65,22 @@ export function selectAccelerator(): void {
|
||||
window.location.hash = ACCELERATOR_HASH;
|
||||
}
|
||||
|
||||
export function selectStats(): void {
|
||||
window.location.hash = STATS_HASH;
|
||||
}
|
||||
|
||||
export function selectBestShare(): void {
|
||||
window.location.hash = BESTSHARE_HASH;
|
||||
}
|
||||
|
||||
export function clearSelection(): void {
|
||||
if (
|
||||
window.history.length > 1 &&
|
||||
(window.location.hash.startsWith(USER_PREFIX) ||
|
||||
window.location.hash.startsWith(WORKER_PREFIX) ||
|
||||
window.location.hash === ACCELERATOR_HASH)
|
||||
window.location.hash === ACCELERATOR_HASH ||
|
||||
window.location.hash === STATS_HASH ||
|
||||
window.location.hash === BESTSHARE_HASH)
|
||||
) {
|
||||
window.history.back();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user