Skip to content

Commit 6579f3e

Browse files
authored
Merge pull request #1 from sei-protocol/fix/lint-issues
fix: resolve golangci-lint gofmt and modernize issues
2 parents c71bc7f + 6bc1387 commit 6579f3e

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

intent.go

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package seiconfig
22

3-
import "fmt"
3+
import (
4+
"fmt"
5+
"slices"
6+
)
47

58
// ConfigIntent declares the desired configuration state for a Sei node.
69
// It is the portable contract between the controller, sidecar, and CLI.
@@ -215,14 +218,7 @@ func validateIntentRequiredFields(result *ConfigResult, intent ConfigIntent, reg
215218
if len(field.RequiredForModes) == 0 {
216219
continue
217220
}
218-
required := false
219-
for _, m := range field.RequiredForModes {
220-
if m == intent.Mode {
221-
required = true
222-
break
223-
}
224-
}
225-
if !required {
221+
if !slices.Contains(field.RequiredForModes, intent.Mode) {
226222
continue
227223
}
228224

legacy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ type legacyMempool struct {
105105
}
106106

107107
type legacyStateSync struct {
108-
Enable bool `toml:"enable"`
109-
UseP2P bool `toml:"use-p2p"`
110-
RPCServers string `toml:"rpc-servers"`
108+
Enable bool `toml:"enable"`
109+
UseP2P bool `toml:"use-p2p"`
110+
RPCServers string `toml:"rpc-servers"`
111111
TrustHeight int64 `toml:"trust-height"`
112112
TrustHash string `toml:"trust-hash"`
113113
TrustPeriod Duration `toml:"trust-period"`

0 commit comments

Comments
 (0)