ax(node): replace prose comment with usage example on IsPublicKeyAllowed

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 <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:08:17 +01:00
parent 11cbfd5107
commit 0bb5287f4b
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

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