Skip to content

Commit

Permalink
Apply Eclesio's fix suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Apr 1, 2022
1 parent 3beef6f commit 642f5ba
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/utils/gossamer_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ func InitializeAndStartNodes(t *testing.T, num int, genesis, config string) (

for i := 0; i < num; i++ {
go func(i int) {
defer wg.Done()
name := strconv.Itoa(i)
if i < len(KeyList) {
name = KeyList[i]
Expand All @@ -337,7 +338,6 @@ func InitializeAndStartNodes(t *testing.T, num int, genesis, config string) (
nodesMutex.Lock()
nodes = append(nodes, node)
nodesMutex.Unlock()
wg.Done()
}(i)
}

Expand All @@ -361,6 +361,7 @@ func InitializeAndStartNodesWebsocket(t *testing.T, num int, genesis, config str

for i := 0; i < num; i++ {
go func(i int) {
defer wg.Done()
name := strconv.Itoa(i)
if i < len(KeyList) {
name = KeyList[i]
Expand All @@ -378,8 +379,6 @@ func InitializeAndStartNodesWebsocket(t *testing.T, num int, genesis, config str
nodesMutex.Lock()
nodes = append(nodes, node)
nodesMutex.Unlock()

wg.Done()
}(i)
}

Expand Down

0 comments on commit 642f5ba

Please sign in to comment.