ax(node): replace prose comment with usage example on PeerRateLimiter.Allow
Some checks failed
Test / test (push) Waiting to run
Security Scan / security (push) Has been cancelled

Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
Claude 2026-04-02 09:39:46 +01:00
parent 442782a742
commit e837423cb7
No known key found for this signature in database
GPG key ID: AF404715446AEB41

View file

@ -134,7 +134,7 @@ func NewPeerRateLimiter(maxTokens, refillRate int) *PeerRateLimiter {
}
}
// Allow checks if a message is allowed and consumes a token if so
// if limiter.Allow() { process(msg) } else { drop(msg) }
func (r *PeerRateLimiter) Allow() bool {
r.mutex.Lock()
defer r.mutex.Unlock()