Skip to content

Commit 9ff98c4

Browse files
chore(deps): bump golanci-lint workflow (celestiaorg#2641)
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
1 parent 47047f3 commit 9ff98c4

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.github/workflows/go-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: golangci-lint
2626
uses: golangci/[email protected]
2727
with:
28-
version: v1.52.2
28+
version: v1.54.2
2929

3030
go_mod_tidy_check:
3131
name: Go Mod Tidy Check

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ run:
44
linters:
55
enable:
66
- bodyclose
7-
- depguard
7+
# - depguard as of v1.54.2, the default config throws errors on our repo
88
- dogsled
99
- dupl
1010
- errcheck

cmd/celestia/rpc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"github.com/celestiaorg/celestia-node/state"
2424
)
2525

26-
const authEnvKey = "CELESTIA_NODE_AUTH_TOKEN"
26+
const authEnvKey = "CELESTIA_NODE_AUTH_TOKEN" //nolint:gosec
2727

2828
var requestURL string
2929
var authTokenFlag string

nodebuilder/config.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ func removeConfig(path string) error {
114114
func UpdateConfig(tp node.Type, path string) (err error) {
115115
path, err = storePath(path)
116116
if err != nil {
117-
return
117+
return err
118118
}
119119

120120
flock, err := fslock.Lock(lockPath(path))
121121
if err != nil {
122122
if err == fslock.ErrLocked {
123123
err = ErrOpened
124124
}
125-
return
125+
return err
126126
}
127127
defer flock.Unlock() //nolint: errcheck
128128

@@ -131,18 +131,18 @@ func UpdateConfig(tp node.Type, path string) (err error) {
131131
cfgPath := configPath(path)
132132
cfg, err := LoadConfig(cfgPath)
133133
if err != nil {
134-
return
134+
return err
135135
}
136136

137137
cfg, err = updateConfig(cfg, newCfg)
138138
if err != nil {
139-
return
139+
return err
140140
}
141141

142142
// save the updated config
143143
err = removeConfig(cfgPath)
144144
if err != nil {
145-
return
145+
return err
146146
}
147147
return SaveConfig(cfgPath, cfg)
148148
}

state/core_access.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ func (ca *CoreAccessor) SubmitPayForBlob(
195195
}
196196

197197
appblobs := make([]*apptypes.Blob, len(blobs))
198-
for i, b := range blobs {
199-
if err := b.Namespace().ValidateForBlob(); err != nil {
198+
for i := range blobs {
199+
if err := blobs[i].Namespace().ValidateForBlob(); err != nil {
200200
return nil, err
201201
}
202-
appblobs[i] = &b.Blob
202+
appblobs[i] = &blobs[i].Blob
203203
}
204204

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

0 commit comments

Comments
 (0)