From e69816f9782595b34a3bf3db19f06d9e13ed71ee Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 10:53:09 +0100 Subject: [PATCH] ax(node): rename n to connectionCount in ConnectedPeers usage example AX Principle 1: predictable names over short names. The comment example used `n` which requires context to understand; `connectionCount` is self-documenting. Co-Authored-By: Charon --- pkg/node/transport.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/node/transport.go b/pkg/node/transport.go index 412edf8..77fd0db 100644 --- a/pkg/node/transport.go +++ b/pkg/node/transport.go @@ -930,8 +930,8 @@ func (t *Transport) decryptMessage(data []byte, sharedSecret []byte) (*Message, return &msg, nil } -// n := transport.ConnectedPeers() -// if n == 0 { return ErrNoPeers } +// connectionCount := transport.ConnectedPeers() +// if connectionCount == 0 { return ErrNoPeers } func (t *Transport) ConnectedPeers() int { t.mutex.RLock() defer t.mutex.RUnlock()