-
Notifications
You must be signed in to change notification settings - Fork 219
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
fix: potential overflow #5778
fix: potential overflow #5778
Conversation
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.
While this PR is only changing a specific addition, there are a lot of the files that are touched that have similar overflow problems. Specifically, in the mempool there are a number of these unchecked additions. I would suggest rather fix all the additions/multiplies in the mempool in this PR, otherwise, it's difficult to approve when there are glaring potential overflows
Description
Fixes potential overflow from fee calculation
Motivation and Context
The transaction comes from remove peers, if the fee is u64::Max this can overflow and panic the node.