From 0bb5287f4b48c3effeb2f7b0549a095f171c422b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 2 Apr 2026 09:08:17 +0100 Subject: [PATCH] ax(node): replace prose comment with usage example on IsPublicKeyAllowed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AX Principle 2: comments show HOW with real values, not WHAT the function does. "checks if a public key is in the allowlist" restates the signature — replaced with a concrete call example. Co-Authored-By: Charon --- pkg/node/peer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/node/peer.go b/pkg/node/peer.go index 3254fe2..3331f2c 100644 --- a/pkg/node/peer.go +++ b/pkg/node/peer.go @@ -185,7 +185,7 @@ func (r *PeerRegistry) RevokePublicKey(publicKey string) { logging.Debug("public key removed from allowlist", logging.Fields{"key": safeKeyPrefix(publicKey)}) } -// IsPublicKeyAllowed checks if a public key is in the allowlist. +// if registry.IsPublicKeyAllowed(peer.PublicKey) { /* permit */ } func (r *PeerRegistry) IsPublicKeyAllowed(publicKey string) bool { r.allowedPublicKeyMutex.RLock() defer r.allowedPublicKeyMutex.RUnlock()