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

Re-enable G115 overflowing integer casts lint #2598

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Conversation

PlasmaPower
Copy link
Collaborator

Fixes NIT-2741

Largely, this PR just fixes ignores the lint at the sites where the issues otherwise occur (e.g. metrics updates, block timestamps, and block numbers) but this PR does sometimes fix or improve casts where I'm confident it doesn't change consensus and is cleaner.

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Aug 21, 2024
@PlasmaPower PlasmaPower changed the title Re-enable G115 lint Re-enable G115 lossy integer casts lint Aug 21, 2024
@PlasmaPower PlasmaPower changed the title Re-enable G115 lossy integer casts lint Re-enable G115 overflowing integer casts lint Aug 21, 2024
@@ -110,7 +111,8 @@ func (s3s *S3StorageService) Put(ctx context.Context, value []byte, timeout uint
Bucket: aws.String(s3s.bucket),
Key: aws.String(s3s.objectPrefix + EncodeStorageServiceKey(dastree.Hash(value))),
Body: bytes.NewReader(value)}
if !s3s.discardAfterTimeout {
if !s3s.discardAfterTimeout && timeout <= math.MaxInt64 {
Copy link
Contributor

@gligneul gligneul Aug 21, 2024

Choose a reason for hiding this comment

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

Is this change on purpose? nvm

Copy link
Collaborator Author

@PlasmaPower PlasmaPower Aug 21, 2024

Choose a reason for hiding this comment

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

It's currently backwards, fixed in #2600

Edit: I've merged that PR to master, and merged master into this one, so it's the right way around now

gligneul
gligneul previously approved these changes Aug 21, 2024
@joshuacolvin0 joshuacolvin0 merged commit a290a69 into master Aug 22, 2024
14 checks passed
@joshuacolvin0 joshuacolvin0 deleted the reenable-g115 branch August 22, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants