Skip to content

Commit

Permalink
Update golangci-lint (#2057)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkushinDaniil authored Aug 19, 2024
1 parent dc46ab3 commit 0367b1d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ install-mockgen:
go install go.uber.org/mock/mockgen@latest

install-golangci-lint:
@which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1
@which golangci-lint || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1

lint: install-golangci-lint
golangci-lint run
Expand Down
2 changes: 1 addition & 1 deletion core/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (s *State) globalTrie(bucket db.Bucket, newTrie trie.NewTrieFunc) (*trie.Tr
})

// if some error other than "not found"
if err != nil && !errors.Is(db.ErrKeyNotFound, err) {
if err != nil && !errors.Is(err, db.ErrKeyNotFound) {
return nil, nil, err
}

Expand Down
1 change: 1 addition & 0 deletions db/pebble/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (t *Transaction) Get(key []byte, cb func([]byte) error) error {
return ErrDiscardedTransaction
}

// We need it evaluated immediately so the duration doesn't include the runtime of the user callback that we call below.
defer t.listener.OnIO(false, time.Since(start)) //nolint:govet
if err != nil {
if errors.Is(err, pebble.ErrNotFound) {
Expand Down
2 changes: 1 addition & 1 deletion p2p/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *syncService) start(ctx context.Context) {
var nextHeight int
if curHeight, err := s.blockchain.Height(); err == nil {
nextHeight = int(curHeight) + 1
} else if !errors.Is(db.ErrKeyNotFound, err) {
} else if !errors.Is(err, db.ErrKeyNotFound) {
s.log.Errorw("Failed to get current height", "err", err)
}

Expand Down

0 comments on commit 0367b1d

Please sign in to comment.