Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
bukata-sa committed Jul 30, 2024
1 parent 6a2553e commit a2563d3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
28 changes: 28 additions & 0 deletions core/internal/cltest/cltest.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/smartcontractkit/chainlink/v2/core/capabilities"
remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types"
p2ptypes "github.com/smartcontractkit/chainlink/v2/core/services/p2p/types"
"io"
"math/big"
"math/rand"
Expand Down Expand Up @@ -317,6 +320,31 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn
auditLogger = audit.NoopLogger
}

var capabilitiesRegistry *capabilities.Registry
capabilitiesRegistry = capabilities.NewRegistry(lggr)
for _, dep := range flagsAndDeps {
registry, _ := dep.(*capabilities.Registry)
if registry != nil {
capabilitiesRegistry = registry
}
}

var dispatcher remotetypes.Dispatcher
for _, dep := range flagsAndDeps {
dispatcher, _ = dep.(remotetypes.Dispatcher)
if dispatcher != nil {
break
}
}

var peerWrapper p2ptypes.PeerWrapper
for _, dep := range flagsAndDeps {
peerWrapper, _ = dep.(p2ptypes.PeerWrapper)
if peerWrapper != nil {
break
}
}

url := cfg.Database().URL()
db, err := pg.NewConnection(url.String(), cfg.Database().Dialect(), cfg.Database())
require.NoError(t, err)
Expand Down
5 changes: 2 additions & 3 deletions core/services/chainlink/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"context"
"fmt"
remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types"
"math/big"
"net/http"
"sync"
Expand All @@ -21,7 +22,6 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/loop"
commonservices "github.com/smartcontractkit/chainlink-common/pkg/services"
"github.com/smartcontractkit/chainlink-common/pkg/sqlutil"
coretypes "github.com/smartcontractkit/chainlink-common/pkg/types/core"
"github.com/smartcontractkit/chainlink-common/pkg/utils"
"github.com/smartcontractkit/chainlink-common/pkg/utils/jsonserializable"
"github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox"
Expand Down Expand Up @@ -59,7 +59,6 @@ import (
externalp2p "github.com/smartcontractkit/chainlink/v2/core/services/p2p/wrapper"
"github.com/smartcontractkit/chainlink/v2/core/services/periodicbackup"
"github.com/smartcontractkit/chainlink/v2/core/services/pipeline"
"github.com/smartcontractkit/chainlink/v2/core/services/promreporter"
"github.com/smartcontractkit/chainlink/v2/core/services/registrysyncer"
"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury"
"github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/wsrpc"
Expand Down Expand Up @@ -530,7 +529,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
opts.KeyStore,
opts.DS,
peerWrapper,
telemetryManager,
opts.TelemetryManager,
cfg.Capabilities(),
)
} else {
Expand Down
1 change: 1 addition & 0 deletions core/services/synchronization/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (
OCR3CCIPCommit TelemetryType = "ocr3-ccip-commit"
OCR3CCIPExec TelemetryType = "ocr3-ccip-exec"
OCR3CCIPBootstrap TelemetryType = "ocr3-bootstrap"
HeadReport TelemetryType = "head-report"
)

type TelemPayload struct {
Expand Down

0 comments on commit a2563d3

Please sign in to comment.