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 <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 10:53:09 +01:00
parent a8b2dad8ec
commit e69816f978
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -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()