Skip to content

Commit 222dc16

Browse files
committed
fix: linting and test typos
1 parent a257171 commit 222dc16

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

pkg/commands/devnet_actions.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func StartDevnetAction(cCtx *cli.Context) error {
7474
}
7575

7676
// Check if docker is running, else try to start it
77-
if skipForking == false {
77+
if !skipForking {
7878
if err := common.EnsureDockerIsRunning(cCtx); err != nil {
7979

8080
if errors.Is(err, context.Canceled) {
@@ -141,7 +141,7 @@ func StartDevnetAction(cCtx *cli.Context) error {
141141
l2ChainDescription := fmt.Sprintf("against RPC %s", l2RpcUrl)
142142

143143
// Start anvil containers
144-
if skipForking == false {
144+
if !skipForking {
145145
l1Port := cCtx.Int("l1-port")
146146
l2Port := cCtx.Int("l2-port")
147147

@@ -270,7 +270,7 @@ func StartDevnetAction(cCtx *cli.Context) error {
270270
// On cancel, stop the containers if we're not skipping deployContracts/avsRun and we're not persisting
271271
if !skipDeployContracts && !skipAvsRun && !persist {
272272
defer func() {
273-
if skipForking == false {
273+
if !skipForking {
274274
logger.Info("Stopping containers")
275275
// Use background context to avoid cancellation issues during cleanup
276276
bgCtx := context.Background()
@@ -372,7 +372,7 @@ func StartDevnetAction(cCtx *cli.Context) error {
372372
// Deploy the contracts after starting devnet unless skipped
373373
if !skipDeployContracts {
374374
// We only need docker if we're forking locally
375-
if skipForking == false {
375+
if !skipForking {
376376
// Check if docker is running, else try to start it
377377
err := common.EnsureDockerIsRunning(cCtx)
378378
if err != nil {

pkg/commands/transporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ func Transport(cCtx *cli.Context, initialRun bool) error {
504504

505505
for _, opset := range opsets {
506506
// Only transport the configured AVSs operatorSets
507-
if strings.ToLower(opset.Avs.Hex()) == strings.ToLower(envCtx.Avs.Address) {
507+
if strings.EqualFold(opset.Avs.Hex(), envCtx.Avs.Address) {
508508
err = stakeTransport.SignAndTransportAvsStakeTable(
509509
cCtx.Context,
510510
referenceTimestamp,

test/integration/migration/avs_context_0_1_1_to_0_1_2_test.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ context:
5959

6060
t.Run("mnemonic inserted with value", func(t *testing.T) {
6161
// value node
62-
val := migration.ResolveNode(migrated, []string{"context", "mnumonic"})
62+
val := migration.ResolveNode(migrated, []string{"context", "mnemonic"})
6363
if val == nil {
64-
t.Fatalf("mnumonic key missing")
64+
t.Fatalf("mnemonic key missing")
6565
}
6666
want := "test test test test test test test test test test test junk"
6767
if val.Value != want {
68-
t.Errorf("expected mnumonic value %q, got %q", want, val.Value)
68+
t.Errorf("expected mnemonic value %q, got %q", want, val.Value)
6969
}
7070
})
7171

@@ -76,38 +76,38 @@ context:
7676
t.Fatalf("context mapping missing or wrong kind %d", ctx.Kind)
7777
}
7878
chainsIdx := -1
79-
mnumonicIdx := -1
79+
mnemonicIdx := -1
8080
for i := 0; i < len(ctx.Content)-1; i += 2 {
8181
k := ctx.Content[i]
8282
switch k.Value {
8383
case "chains":
8484
chainsIdx = i
85-
case "mnumonic":
86-
mnumonicIdx = i
85+
case "mnemonic":
86+
mnemonicIdx = i
8787
}
8888
}
8989
if chainsIdx < 0 {
9090
t.Fatalf("context.chains key not found")
9191
}
92-
if mnumonicIdx < 0 {
93-
t.Fatalf("context.mnumonic key not found")
92+
if mnemonicIdx < 0 {
93+
t.Fatalf("context.mnemonic key not found")
9494
}
95-
if mnumonicIdx != chainsIdx+2 {
96-
t.Errorf("mnumonic not inserted immediately after chains: chainsIdx=%d mnumonicIdx=%d", chainsIdx, mnumonicIdx)
95+
if mnemonicIdx != chainsIdx+2 {
96+
t.Errorf("mnemonic not inserted immediately after chains: chainsIdx=%d mnemonicIdx=%d", chainsIdx, mnemonicIdx)
9797
}
9898
})
9999

100-
t.Run("comment attached to mnumonic key", func(t *testing.T) {
100+
t.Run("comment attached to mnemonic key", func(t *testing.T) {
101101
ctx := migration.ResolveNode(migrated, []string{"context"})
102102
var keyNode *yaml.Node
103103
for i := 0; i < len(ctx.Content)-1; i += 2 {
104-
if ctx.Content[i].Value == "mnumonic" {
104+
if ctx.Content[i].Value == "mnemonic" {
105105
keyNode = ctx.Content[i]
106106
break
107107
}
108108
}
109109
if keyNode == nil {
110-
t.Fatalf("mnumonic key node not found")
110+
t.Fatalf("mnemonic key node not found")
111111
}
112112
wantComment := "Devnet mnemonic for unlocked accounts"
113113
if keyNode.HeadComment != wantComment {

0 commit comments

Comments
 (0)