From 0979fd1aea5ca86e9b6e890f5e5e9ea9ca5492b2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 08:54:44 +0100 Subject: [PATCH] ax(node): replace prose comment with usage example on GetRemoteStats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 2 — comments must show HOW with real values, not restate what the type signature already says. Co-Authored-By: Charon --- pkg/node/controller.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/node/controller.go b/pkg/node/controller.go index 73cc690..f4312db 100644 --- a/pkg/node/controller.go +++ b/pkg/node/controller.go @@ -111,7 +111,8 @@ func (c *Controller) sendRequest(peerID string, msg *Message, timeout time.Durat } } -// GetRemoteStats requests miner statistics from a remote peer. +// stats, err := ctrl.GetRemoteStats("abc123def456") +// if err == nil { log("miners:", len(stats.Miners)) } func (c *Controller) GetRemoteStats(peerID string) (*StatsPayload, error) { identity := c.node.GetIdentity() if identity == nil {