Skip to content

Commit

Permalink
fix lint 2
Browse files Browse the repository at this point in the history
  • Loading branch information
goran-ethernal committed Aug 26, 2024
1 parent fae2a40 commit 5a52414
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tracker/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func (e *EventTracker) getNewState(latestBlock *ethgo.Block) error {

// get and add blocks in batch
for j := i; j <= end; j++ {
block, err := e.config.BlockProvider.GetBlockByNumber(ethgo.BlockNumber(j), false)
block, err := e.config.BlockProvider.GetBlockByNumber(ethgo.BlockNumber(j), false) //nolint:gosec
if err != nil {
e.config.Logger.Error("Getting new state for block batch failed on rpc call",
"fromBlock", i,
Expand Down
2 changes: 1 addition & 1 deletion tracker/tracker_block_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (t *TrackerBlockContainer) IsOutOfSync(block *ethgo.Block) bool {
// Outputs:
// - A slice of uint64 representing the block numbers of confirmed blocks.
func (t *TrackerBlockContainer) GetConfirmedBlocks(numBlockConfirmations uint64) []uint64 {
numBlockConfirmationsInt := int(numBlockConfirmations)
numBlockConfirmationsInt := int(numBlockConfirmations) //nolint:gosec
if len(t.blocks) > numBlockConfirmationsInt {
return t.blocks[:len(t.blocks)-numBlockConfirmationsInt]
}
Expand Down
2 changes: 1 addition & 1 deletion tracker/tracker_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func FuzzGetNewState(f *testing.F) {

providerMock := new(mockProvider)
for blockNum := data.LastProcessed + 1; blockNum <= data.Number; blockNum++ {
providerMock.On("GetBlockByNumber", ethgo.BlockNumber(blockNum), false).Return(
providerMock.On("GetBlockByNumber", ethgo.BlockNumber(blockNum), false).Return( //nolint:gosec
&ethgo.Block{Number: blockNum}, nil).Once()
}

Expand Down

0 comments on commit 5a52414

Please sign in to comment.