Skip to content

Commit 2773caa

Browse files
committed
fixup: Respond to review comments
1 parent d196acf commit 2773caa

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

tests/e2e/faultinjection/duplicate_node_id.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fmt"
99

1010
ginkgo "github.com/onsi/ginkgo/v2"
11+
1112
"github.com/stretchr/testify/require"
1213

1314
"github.com/ava-labs/avalanchego/api/info"

tests/fixture/testnet/local/network.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -677,16 +677,20 @@ func (ln *LocalNetwork) AddLocalNode(w io.Writer, node *LocalNode, isEphemeral b
677677
return nil, err
678678
}
679679

680-
// Use dynamic port allocation.
681-
var httpPort uint16 = 0
682-
var stakingPort uint16 = 0
683-
684680
// Collect staking addresses of running nodes for use in bootstraping the new node
685681
if err := ln.ReadNodes(); err != nil {
686682
return nil, fmt.Errorf("failed to read local network nodes: %w", err)
687683
}
688-
bootstrapIPs := make([]string, 0, len(ln.Nodes))
689-
bootstrapIDs := make([]string, 0, len(ln.Nodes))
684+
685+
var (
686+
// Use dynamic port allocation.
687+
httpPort uint16 = 0
688+
stakingPort uint16 = 0
689+
690+
bootstrapIPs = make([]string, 0, len(ln.Nodes))
691+
bootstrapIDs = make([]string, 0, len(ln.Nodes))
692+
)
693+
690694
for _, node := range ln.Nodes {
691695
if len(node.StakingAddress) == 0 {
692696
// Node is not running

0 commit comments

Comments
 (0)