Skip to content

Commit 1b3fdd6

Browse files
committed
Use framework.DefaultNetwork()
1 parent ea35285 commit 1b3fdd6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

deployment/environment/memory/chain.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"os"
77
"path"
88
"strconv"
9+
"sync"
910
"testing"
1011
"time"
1112

@@ -139,12 +140,14 @@ func evmChain(t *testing.T, numUsers int) EVMChain {
139140
}
140141
}
141142

143+
var once = &sync.Once{}
144+
142145
func solChain(t *testing.T) SolanaChain {
143146
t.Helper()
144147

145148
// initialize the docker network used by CTF
146-
// TODO: framework.DefaultNetwork(once) is broken for me, use a static name for now
147-
framework.DefaultNetworkName = "chainlink"
149+
err := framework.DefaultNetwork(once)
150+
require.NoError(t, err)
148151

149152
deployerKey, err := solana.NewRandomPrivateKey()
150153
require.NoError(t, err)
@@ -160,8 +163,7 @@ func solChain(t *testing.T) SolanaChain {
160163
port := freeport.GetOne(t)
161164

162165
bcInput := &blockchain.Input{
163-
Type: "solana",
164-
// TODO: randomize port
166+
Type: "solana",
165167
ChainID: chainselectors.SOLANA_DEVNET.ChainID,
166168
PublicKey: deployerKey.PublicKey().String(),
167169
Port: strconv.Itoa(port),

0 commit comments

Comments
 (0)