Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing unused function from feeds #1253

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading