Skip to content

Commit

Permalink
use WsHandshakeTimeoutMillis
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidOrchard committed Sep 3, 2024
1 parent fc3bc6b commit 6bcb60d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
6 changes: 1 addition & 5 deletions core/config/capabilities_config.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -21,7 +17,7 @@ type GatewayConnectorConfig interface {
NodeAddress() string
DonId() string
Gateways() []ConnectorGatewayConfig
WsClientConfig() network.WebSocketClientConfig
WsHandshakeTimeoutMillis() uint32
AuthMinChallengeLen() int
AuthTimestampToleranceSec() uint32
}
Expand Down
7 changes: 3 additions & 4 deletions core/config/toml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -1487,7 +1486,7 @@ type GatewayConnectorConfig struct {
NodeAddress *string
DonId *string
Gateways []ConnectorGatewayConfig
WsClientConfig *network.WebSocketClientConfig
WsHandshakeTimeoutMillis *uint32
AuthMinChallengeLen *int
AuthTimestampToleranceSec *uint32
}
Expand All @@ -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 {
Expand Down
5 changes: 2 additions & 3 deletions core/services/chainlink/config_capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6bcb60d

Please sign in to comment.