Skip to content
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 panic when block tag greater than MaxInt64 is provided in parameters #92

Merged
merged 1 commit into from
May 3, 2024

Conversation

nddeluca
Copy link
Member

@nddeluca nddeluca commented May 2, 2024

This adds a IsInt64 check to the parsed cosmosmath.Int before Int64() conversion to prevent a panic.

Also, refactored the logic to improve readability and push this parsing complexity into it's own private method with doc comment.


blockNumber = spaceint.Int64()
if !result.IsInt64() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@nddeluca nddeluca merged commit a6a90d4 into main May 3, 2024
4 checks passed
@nddeluca nddeluca deleted the nd-fix-panic-on-block-tag-int64-overflow branch May 3, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants