ax(node): replace prose comment with usage example on GetRemoteStats
AX Principle 2 — comments must show HOW with real values, not restate what the type signature already says. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
0c7546650a
commit
0979fd1aea
1 changed files with 2 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue