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

chore: added integer overflow linter error to exclude list #1223

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ issues:
- mempool
- state/indexer
- state/txindex
exclude-rules:
- text: "G115: integer overflow conversion"
linters: [ gosec ]


linters-settings:
Expand Down
2 changes: 1 addition & 1 deletion block/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func (m *Manager) CreateBatch(maxBatchSize uint64, startHeight uint64, endHeight
batch.DRSVersion = append(batch.DRSVersion, drsVersion)

totalSize := batch.SizeBytes()
if int(maxBatchSize) < totalSize {
if maxBatchSize < uint64(totalSize) {

// Remove the last block and commit from the batch
batch.Blocks = batch.Blocks[:len(batch.Blocks)-1]
Expand Down
Loading