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:
parent
11cbfd5107
commit
0bb5287f4b
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue