From f3c5175785c564ceaff7ea5b52482b2c21739d4c Mon Sep 17 00:00:00 2001 From: Virgil Date: Sun, 5 Apr 2026 00:59:17 +0000 Subject: [PATCH] docs(proxy): align AX usage comments Co-Authored-By: Virgil --- api_rows.go | 7 ++++--- customdiffstats.go | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/api_rows.go b/api_rows.go index d3a11c9..1c4c79e 100644 --- a/api_rows.go +++ b/api_rows.go @@ -7,7 +7,8 @@ type WorkerRow [13]any type MinerRow [10]any // doc := p.SummaryDocument() -// doc.Results.Accepted == 4821 +// _ = doc.Results.Accepted +// _ = doc.Upstreams.Ratio type SummaryDocument struct { Version string `json:"version"` Mode string `json:"mode"` @@ -52,14 +53,14 @@ type ResultsDocument struct { } // doc := p.WorkersDocument() -// doc.Workers[0][0] == "rig-alpha" +// _ = doc.Workers[0][0] type WorkersDocument struct { Mode string `json:"mode"` Workers []WorkerRow `json:"workers"` } // doc := p.MinersDocument() -// doc.Miners[0][7] == "********" +// _ = doc.Miners[0][7] type MinersDocument struct { Format []string `json:"format"` Miners []MinerRow `json:"miners"` diff --git a/customdiffstats.go b/customdiffstats.go index 665b811..f82cb57 100644 --- a/customdiffstats.go +++ b/customdiffstats.go @@ -17,7 +17,7 @@ type CustomDiffBucketStats struct { // CustomDiffBuckets records share totals grouped by miner custom difficulty. // // buckets := NewCustomDiffBuckets(true) -// buckets.OnAccept(proxy.Event{Miner: &proxy.Miner{}}) +// buckets.OnAccept(Event{Miner: &Miner{customDiff: 50000}, Diff: 25000}) type CustomDiffBuckets struct { enabled bool buckets map[uint64]*CustomDiffBucketStats @@ -74,6 +74,8 @@ func (b *CustomDiffBuckets) OnReject(e Event) { } // Snapshot returns a copy of the current bucket totals. +// +// summary := buckets.Snapshot() func (b *CustomDiffBuckets) Snapshot() map[uint64]CustomDiffBucketStats { if b == nil { return nil