From 6bcb60db9c1f3a60e474b9b0fb0eba54fc7311dc Mon Sep 17 00:00:00 2001 From: David Orchard Date: Tue, 3 Sep 2024 16:31:34 -0700 Subject: [PATCH] use WsHandshakeTimeoutMillis --- core/config/capabilities_config.go | 6 +----- core/config/toml/types.go | 7 +++---- core/services/chainlink/config_capabilities.go | 5 ++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/core/config/capabilities_config.go b/core/config/capabilities_config.go index a4475331aab..f9966c3448b 100644 --- a/core/config/capabilities_config.go +++ b/core/config/capabilities_config.go @@ -1,13 +1,9 @@ package config -// import cycle not allowed in testgo list - import ( "math/big" "github.com/smartcontractkit/chainlink-common/pkg/types" - // import cycle not allowedgo list - "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network" ) type CapabilitiesExternalRegistry interface { @@ -21,7 +17,7 @@ type GatewayConnectorConfig interface { NodeAddress() string DonId() string Gateways() []ConnectorGatewayConfig - WsClientConfig() network.WebSocketClientConfig + WsHandshakeTimeoutMillis() uint32 AuthMinChallengeLen() int AuthTimestampToleranceSec() uint32 } diff --git a/core/config/toml/types.go b/core/config/toml/types.go index 1207a9c41a7..5830fe53de6 100644 --- a/core/config/toml/types.go +++ b/core/config/toml/types.go @@ -23,7 +23,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/parse" - "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey" "github.com/smartcontractkit/chainlink/v2/core/sessions" "github.com/smartcontractkit/chainlink/v2/core/store/dialects" @@ -1487,7 +1486,7 @@ type GatewayConnectorConfig struct { NodeAddress *string DonId *string Gateways []ConnectorGatewayConfig - WsClientConfig *network.WebSocketClientConfig + WsHandshakeTimeoutMillis *uint32 AuthMinChallengeLen *int AuthTimestampToleranceSec *uint32 } @@ -1506,8 +1505,8 @@ func (r *GatewayConnectorConfig) setFrom(f *GatewayConnectorConfig) { r.Gateways = f.Gateways } - if !reflect.ValueOf(f.WsClientConfig).IsZero() { - r.WsClientConfig = f.WsClientConfig + if !reflect.ValueOf(f.WsHandshakeTimeoutMillis).IsZero() { + r.WsHandshakeTimeoutMillis = f.WsHandshakeTimeoutMillis } if f.AuthMinChallengeLen != nil { diff --git a/core/services/chainlink/config_capabilities.go b/core/services/chainlink/config_capabilities.go index 26ee479cc87..f766e8f34a4 100644 --- a/core/services/chainlink/config_capabilities.go +++ b/core/services/chainlink/config_capabilities.go @@ -6,7 +6,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/config/toml" - "github.com/smartcontractkit/chainlink/v2/core/services/gateway/network" ) var _ config.Capabilities = (*capabilitiesConfig)(nil) @@ -125,8 +124,8 @@ func (c *gatewayConnectorConfig) Gateways() []config.ConnectorGatewayConfig { return t } -func (c *gatewayConnectorConfig) WsClientConfig() network.WebSocketClientConfig { - return *c.c.WsClientConfig +func (c *gatewayConnectorConfig) WsHandshakeTimeoutMillis() uint32 { + return *c.c.WsHandshakeTimeoutMillis } func (c *gatewayConnectorConfig) AuthMinChallengeLen() int {