-
Notifications
You must be signed in to change notification settings - Fork 898
Enable arithmetic lint in rate-limiter #7025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable arithmetic lint in rate-limiter #7025
Conversation
@ackintosh ready to review this one - would you mind resolving the conflicts please? |
# Conflicts: # beacon_node/lighthouse_network/src/rpc/self_limiter.rs
All required checks have passed and there are no merge conflicts. This pull request may now be ready for another review. |
@jimmygchen Thanks! I've resolved the conflicts and updated the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for adding the tests and the explanation!
Issue Addressed
#6875
Proposed Changes
Quota::max_tokens
fromu64
toNonZeroU64
becausemax_tokens
cannot be zero.tokens
, which causes an overflow, is handled properly.