Skip to content

Commit

Permalink
Removing unused function from feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara committed Aug 2, 2024
1 parent a5c94c6 commit 5c9d0ee
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 48 deletions.
33 changes: 0 additions & 33 deletions core/services/feeds/mocks/service.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 1 addition & 13 deletions core/services/feeds/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/smartcontractkit/chainlink-common/pkg/services"
"github.com/smartcontractkit/chainlink-common/pkg/sqlutil"

"github.com/smartcontractkit/chainlink/v2/plugins"

"github.com/smartcontractkit/chainlink/v2/core/chains/evm/types"
Expand Down Expand Up @@ -107,8 +108,6 @@ type Service interface {
ListSpecsByJobProposalIDs(ctx context.Context, ids []int64) ([]JobProposalSpec, error)
RejectSpec(ctx context.Context, id int64) error
UpdateSpecDefinition(ctx context.Context, id int64, spec string) error

Unsafe_SetConnectionsManager(ConnectionsManager)
}

type service struct {
Expand Down Expand Up @@ -1130,16 +1129,6 @@ func findExistingJobForOCR2(ctx context.Context, j *job.Job, tx job.ORM) (int32,
return tx.FindOCR2JobIDByAddress(ctx, contractID, feedID)
}

// Unsafe_SetConnectionsManager sets the ConnectionsManager on the service.
//
// We need to be able to inject a mock for the client to facilitate integration
// tests.
//
// ONLY TO BE USED FOR TESTING.
func (s *service) Unsafe_SetConnectionsManager(connMgr ConnectionsManager) {
s.connMgr = connMgr
}

// findExistingJobForOCRFlux looks for existing job for OCR or flux
func findExistingJobForOCRFlux(ctx context.Context, j *job.Job, tx job.ORM) (int32, error) {
var address types.EIP55Address
Expand Down Expand Up @@ -1507,6 +1496,5 @@ func (ns NullService) IsJobManaged(ctx context.Context, jobID int64) (bool, erro
func (ns NullService) UpdateSpecDefinition(ctx context.Context, id int64, spec string) error {
return ErrFeedsManagerDisabled
}
func (ns NullService) Unsafe_SetConnectionsManager(_ ConnectionsManager) {}

//revive:enable
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,6 @@ func (c *CCIPIntegrationTestHarness) SetupFeedsManager(t *testing.T) {
connManager.On("GetClient", mock.Anything).Maybe().Return(NoopFeedsClient{}, nil)
connManager.On("Close").Maybe().Return()
connManager.On("IsConnected", mock.Anything).Maybe().Return(true)
f.Unsafe_SetConnectionsManager(connManager)

_, err = f.RegisterManager(testutils.Context(t), m)
require.NoError(t, err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ func (c *CCIPIntegrationTestHarness) SetupFeedsManager(t *testing.T) {
connManager.On("GetClient", mock.Anything).Maybe().Return(NoopFeedsClient{}, nil)
connManager.On("Close").Maybe().Return()
connManager.On("IsConnected", mock.Anything).Maybe().Return(true)
f.Unsafe_SetConnectionsManager(connManager)
}
}

Expand Down

0 comments on commit 5c9d0ee

Please sign in to comment.