Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bournezjc committed Oct 16, 2024
1 parent 520a64c commit 4c6b851
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- 'chore/ci-publish-docker'
- 'main'
- 'bourne/gosec-followup'
tags:
- '*'

Expand All @@ -17,7 +18,7 @@ jobs:
run-unit-tests: true
run-check-mock-gen: true
run-gosec: true
gosec-args: "-exclude=G115,G112,G104 -exclude-generated -exclude-dir=testutil ./..."
gosec-args: "-exclude-generated -exclude-dir=testutil ./..."

docker_pipeline:
needs: ["lint_test"]
Expand Down
4 changes: 4 additions & 0 deletions finalitygadget/finalitygadget.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,10 @@ func (fg *FinalityGadget) handleBlock(ctx context.Context, latestFinalizedHeight
case <-ctx.Done():
return nil
default:
// Safely convert uint64 to int64
if height > math.MaxInt64 {
return fmt.Errorf("block height %d exceeds maximum int64 value", height)
}
block, err := fg.queryBlockByHeight(int64(height))
if err != nil {
return fmt.Errorf("error getting block at height %d: %w", height, err)
Expand Down

0 comments on commit 4c6b851

Please sign in to comment.