Skip to content

Commit

Permalink
chore(deps): bump golanci-lint workflow (#2641)
Browse files Browse the repository at this point in the history
Self explanatory. The reason for the fix in core_accessor was an
implicit memory aliasing. It was taking the address of the loop
variable, which doesn't change in between iterations ofc, so the every
blob pointed to the last blob
  • Loading branch information
distractedm1nd committed Sep 4, 2023
1 parent 47047f3 commit 9ff98c4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.6.0
with:
version: v1.52.2
version: v1.54.2

go_mod_tidy_check:
name: Go Mod Tidy Check
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run:
linters:
enable:
- bodyclose
- depguard
# - depguard as of v1.54.2, the default config throws errors on our repo
- dogsled
- dupl
- errcheck
Expand Down
2 changes: 1 addition & 1 deletion cmd/celestia/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/celestiaorg/celestia-node/state"
)

const authEnvKey = "CELESTIA_NODE_AUTH_TOKEN"
const authEnvKey = "CELESTIA_NODE_AUTH_TOKEN" //nolint:gosec

var requestURL string
var authTokenFlag string
Expand Down
10 changes: 5 additions & 5 deletions nodebuilder/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ func removeConfig(path string) error {
func UpdateConfig(tp node.Type, path string) (err error) {
path, err = storePath(path)
if err != nil {
return
return err
}

flock, err := fslock.Lock(lockPath(path))
if err != nil {
if err == fslock.ErrLocked {
err = ErrOpened
}
return
return err
}
defer flock.Unlock() //nolint: errcheck

Expand All @@ -131,18 +131,18 @@ func UpdateConfig(tp node.Type, path string) (err error) {
cfgPath := configPath(path)
cfg, err := LoadConfig(cfgPath)
if err != nil {
return
return err
}

cfg, err = updateConfig(cfg, newCfg)
if err != nil {
return
return err
}

// save the updated config
err = removeConfig(cfgPath)
if err != nil {
return
return err
}
return SaveConfig(cfgPath, cfg)
}
Expand Down
6 changes: 3 additions & 3 deletions state/core_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ func (ca *CoreAccessor) SubmitPayForBlob(
}

appblobs := make([]*apptypes.Blob, len(blobs))
for i, b := range blobs {
if err := b.Namespace().ValidateForBlob(); err != nil {
for i := range blobs {
if err := blobs[i].Namespace().ValidateForBlob(); err != nil {
return nil, err
}
appblobs[i] = &b.Blob
appblobs[i] = &blobs[i].Blob
}

// we only estimate gas if the user wants us to (by setting the gasLim to 0). In the future we may
Expand Down

0 comments on commit 9ff98c4

Please sign in to comment.