Skip to content

Commit

Permalink
Use randomized port for solana validator
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 8, 2025
1 parent 95d24a5 commit 75bf435
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deployment/environment/memory/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package memory

import (
"math/big"
"strconv"
"testing"
"time"

Expand All @@ -12,6 +13,7 @@ import (
"github.com/ethereum/go-ethereum/ethclient/simulated"
"github.com/gagliardetto/solana-go"
solRpc "github.com/gagliardetto/solana-go/rpc"
"github.com/hashicorp/consul/sdk/freeport"
"github.com/stretchr/testify/require"

chainsel "github.com/smartcontractkit/chain-selectors"
Expand Down Expand Up @@ -115,11 +117,14 @@ func solChain(t *testing.T) SolChain {
require.NoError(t, err)
// TODO: fund this key

port := freeport.GetOne(t)

bcInput := &blockchain.Input{
Type: "solana",
// TODO: randomize port
ChainID: chainselectors.SOLANA_DEVNET.ChainID,
PublicKey: deployerKey.PublicKey().String(),
Port: strconv.Itoa(port),
// TODO: ContractsDir & SolanaPrograms via env vars
}
output, err := blockchain.NewBlockchainNetwork(bcInput)
Expand Down

0 comments on commit 75bf435

Please sign in to comment.