Skip to content

Commit

Permalink
Remove WS validation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcauchi committed Nov 7, 2024
1 parent 3c5e76a commit 2aa1df1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions lib/config/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ func (n *NetworkConfig) Validate() error {
return fmt.Errorf("at least one HTTP RPC endpoint for %s network must be set", network)
}

if _, ok := n.RpcWsUrls[network]; !ok {
return fmt.Errorf("at least one WS RPC endpoint for %s network must be set", network)
}
// if _, ok := n.RpcWsUrls[network]; !ok {
// return fmt.Errorf("at least one WS RPC endpoint for %s network must be set", network)
// }

if _, ok := n.WalletKeys[network]; !ok {
return fmt.Errorf("at least one private key of funding wallet for %s network must be set", network)
Expand Down
16 changes: 8 additions & 8 deletions lib/config/testconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,14 @@ func (c *TestConfig) ReadFromEnvVar() error {
c.Network.RpcHttpUrls = rpcHttpUrls
}

rpcWsUrls := ReadEnvVarGroupedMap(E2E_TEST_RPC_WS_URL_ENV, E2E_TEST_RPC_WS_URLS_ENV)
if len(rpcWsUrls) > 0 {
if c.Network == nil {
c.Network = &NetworkConfig{}
}
logger.Info().Msgf("Using %s and/or %s env vars to override Network.RpcWsUrls", E2E_TEST_RPC_WS_URL_ENV, E2E_TEST_RPC_WS_URLS_ENV)
c.Network.RpcWsUrls = rpcWsUrls
}
// rpcWsUrls := ReadEnvVarGroupedMap(E2E_TEST_RPC_WS_URL_ENV, E2E_TEST_RPC_WS_URLS_ENV)
// if len(rpcWsUrls) > 0 {
// if c.Network == nil {
// c.Network = &NetworkConfig{}
// }
// logger.Info().Msgf("Using %s and/or %s env vars to override Network.RpcWsUrls", E2E_TEST_RPC_WS_URL_ENV, E2E_TEST_RPC_WS_URLS_ENV)
// c.Network.RpcWsUrls = rpcWsUrls
// }

chainlinkImage := MustReadEnvVar_String(E2E_TEST_CHAINLINK_IMAGE_ENV)
if chainlinkImage != "" {
Expand Down
9 changes: 5 additions & 4 deletions lib/networks/known_networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -1104,10 +1104,11 @@ func SetNetworks(networkCfg config.NetworkConfig) ([]blockchain.EVMNetwork, erro
// if network is not simulated or forked, use the rpc urls and wallet keys from config
if !strings.Contains(networkName, "SIMULATED") && !forked {
var ok bool
wsUrls, ok = networkCfg.RpcWsUrls[selectedNetworks[i]]
if !ok {
return nil, fmt.Errorf("no rpc ws urls found in config for '%s' network", selectedNetworks[i])
}

// wsUrls, ok = networkCfg.RpcWsUrls[selectedNetworks[i]]
// if !ok {
// return nil, fmt.Errorf("no rpc ws urls found in config for '%s' network", selectedNetworks[i])
// }

httpUrls, ok = networkCfg.RpcHttpUrls[selectedNetworks[i]]
if !ok {
Expand Down

0 comments on commit 2aa1df1

Please sign in to comment.