ax(node): rename loop variable p to peer in GetPeersByScore

AX Principle 1 — predictable names over short names. Single-letter
variable p in GetPeersByScore replaced with peer, matching the type
it holds and the usage in surrounding code.

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 10:27:32 +01:00
parent 6d70f4a85f
commit 3cf01162d5
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -464,8 +464,8 @@ func (r *PeerRegistry) GetPeersByScore() []*Peer {
defer r.mutex.RUnlock()
peers := make([]*Peer, 0, len(r.peers))
for _, p := range r.peers {
peers = append(peers, p)
for _, peer := range r.peers {
peers = append(peers, peer)
}
// Sort by score descending