Skip to content

Commit

Permalink
fix renaming params
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Apr 11, 2024
1 parent c11ca97 commit 70d2ca6
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/pelletier/go-toml/v2 v2.1.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.17.0
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240405210326-40bad7d28e6b
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240410141935-2006c62919ef
github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052
github.com/stretchr/testify v1.9.0
go.uber.org/multierr v1.11.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240405210326-40bad7d28e6b h1:+dmDADqMHkPrxOS9+T+A9ftp+nERujuEBoEyZ08EMls=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240405210326-40bad7d28e6b/go.mod h1:kstYjAGqBswdZpl7YkSPeXBDVwaY1VaR6tUMPWl8ykA=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240410141935-2006c62919ef h1:Cu6yTsnAV3qiIynJH1Z7Y8YB0Ftxop3wKfa6ioDtsjY=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240410141935-2006c62919ef/go.mod h1:kstYjAGqBswdZpl7YkSPeXBDVwaY1VaR6tUMPWl8ykA=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss=
github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4=
github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU=
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/lib/pq v1.10.9
github.com/onsi/gomega v1.30.0
github.com/rs/zerolog v1.30.0
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240405210326-40bad7d28e6b
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240410141935-2006c62919ef
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e
github.com/smartcontractkit/chainlink-testing-framework v1.27.8
github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240327222022-90568911d216
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1417,8 +1417,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq
github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35 h1:GNhRKD3izyzAoGMXDvVUAwEuzz4Atdj3U3RH7eak5Is=
github.com/smartcontractkit/chainlink-automation v1.0.2-0.20240311111125-22812a072c35/go.mod h1:2I0dWdYdK6jHPnSYYy7Y7Xp7L0YTnJ3KZtkhLQflsTU=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240405210326-40bad7d28e6b h1:+dmDADqMHkPrxOS9+T+A9ftp+nERujuEBoEyZ08EMls=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240405210326-40bad7d28e6b/go.mod h1:kstYjAGqBswdZpl7YkSPeXBDVwaY1VaR6tUMPWl8ykA=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240410141935-2006c62919ef h1:Cu6yTsnAV3qiIynJH1Z7Y8YB0Ftxop3wKfa6ioDtsjY=
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240410141935-2006c62919ef/go.mod h1:kstYjAGqBswdZpl7YkSPeXBDVwaY1VaR6tUMPWl8ykA=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 h1:I326nw5GwHQHsLKHwtu5Sb9EBLylC8CfUd7BFAS0jtg=
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8/go.mod h1:a65NtrK4xZb01mf0dDNghPkN2wXgcqFQ55ADthVBgMc=
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/exporter/feedbalances.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type feedBalancesFactory struct {
}

func (p *feedBalancesFactory) NewExporter(
params commonMonitoring.ExporterParams,
params commonMonitoring.Params,
) (commonMonitoring.Exporter, error) {
return &feeBalances{
params.ChainConfig,
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/exporter/feedbalances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestFeedBalances(t *testing.T) {

chainConfig := testutils.GenerateChainConfig()
feedConfig := testutils.GenerateFeedConfig()
exporter, err := factory.NewExporter(commonMonitoring.ExporterParams{ChainConfig: chainConfig, FeedConfig: feedConfig, Nodes: []commonMonitoring.NodeConfig{}})
exporter, err := factory.NewExporter(commonMonitoring.Params{ChainConfig: chainConfig, FeedConfig: feedConfig, Nodes: []commonMonitoring.NodeConfig{}})
require.NoError(t, err)

balances := testutils.GenerateBalances()
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/exporter/nodebalances.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type nodeBalancesFactory struct {
metricsFunc metricsBuilder
}

func (f *nodeBalancesFactory) NewExporter(params commonMonitoring.ExporterParams) (commonMonitoring.Exporter, error) {
func (f *nodeBalancesFactory) NewExporter(params commonMonitoring.Params) (commonMonitoring.Exporter, error) {
if f.metricsFunc == nil {
return nil, fmt.Errorf("metrics generator is nil")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/exporter/nodebalances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestNodeBalances(t *testing.T) {

chainConfig := testutils.GenerateChainConfig()
feedConfig := testutils.GenerateFeedConfig()
exporter, err := factory.NewExporter(commonMonitoring.ExporterParams{ChainConfig: chainConfig, FeedConfig: feedConfig, Nodes: []commonMonitoring.NodeConfig{}})
exporter, err := factory.NewExporter(commonMonitoring.Params{ChainConfig: chainConfig, FeedConfig: feedConfig, Nodes: []commonMonitoring.NodeConfig{}})
require.NoError(t, err)

// happy path
Expand Down
6 changes: 3 additions & 3 deletions pkg/monitoring/source_balances_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func TestFeedBalancesSource(t *testing.T) {
assert.Equal(t, types.BalanceType, factory.GetType())

// generate source
source, err := factory.NewSource(commonMonitoring.SourceParams{})
source, err := factory.NewSource(commonMonitoring.Params{})
assert.Error(t, err)
source, err = factory.NewSource(commonMonitoring.SourceParams{
source, err = factory.NewSource(commonMonitoring.Params{
FeedConfig: config.SolanaFeedConfig{
ContractAddress: testutils.GeneratePublicKey(),
StateAccount: testutils.GeneratePublicKey(),
Expand Down Expand Up @@ -140,7 +140,7 @@ func TestNodeBalancesSource(t *testing.T) {
factory := NewNodeBalancesSourceFactory(cr, lgr)
assert.True(t, commonMonitoring.IsNodesOnly(factory.GetType()))

s, err := factory.NewSource(commonMonitoring.SourceParams{
s, err := factory.NewSource(commonMonitoring.Params{
Nodes: []commonMonitoring.NodeConfig{
config.SolanaNodeConfig{
ID: t.Name(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/source_envelope.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type envelopeSourceFactory struct {
}

func (s *envelopeSourceFactory) NewSource(
cfg commonMonitoring.SourceParams,
cfg commonMonitoring.Params,
) (commonMonitoring.Source, error) {
solanaFeedConfig, ok := cfg.FeedConfig.(config.SolanaFeedConfig)
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/source_envelope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func TestEnvelopeSource(t *testing.T) {

// Call Fetch
factory := NewEnvelopeSourceFactory(chainReader, testutils.NewNullLogger())
source, err := factory.NewSource(commonMonitoring.SourceParams{
source, err := factory.NewSource(commonMonitoring.Params{
ChainConfig: chainConfig,
FeedConfig: feedConfig,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/source_feed_balances.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type feedBalancesSourceFactory struct {
log commonMonitoring.Logger
}

func (s *feedBalancesSourceFactory) NewSource(input commonMonitoring.SourceParams) (commonMonitoring.Source, error) {
func (s *feedBalancesSourceFactory) NewSource(input commonMonitoring.Params) (commonMonitoring.Source, error) {
solanaFeedConfig, ok := input.FeedConfig.(config.SolanaFeedConfig)
if !ok {
return nil, fmt.Errorf("expected feedConfig to be of type config.SolanaFeedConfig not %T", input.FeedConfig)
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/source_node_balances.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type nodeBalancesSourceFactory struct {
log commonMonitoring.Logger
}

func (s *nodeBalancesSourceFactory) NewSource(input commonMonitoring.SourceParams) (commonMonitoring.Source, error) {
func (s *nodeBalancesSourceFactory) NewSource(input commonMonitoring.Params) (commonMonitoring.Source, error) {
nodes, err := config.MakeSolanaNodeConfigs(input.Nodes)
if err != nil {
return nil, fmt.Errorf("NodeBalancesSourceFactory.NewSource: %w", err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/source_txresults.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type txResultsSourceFactory struct {
}

func (s *txResultsSourceFactory) NewSource(
cfg commonMonitoring.SourceParams,
cfg commonMonitoring.Params,
) (commonMonitoring.Source, error) {
solanaFeedConfig, ok := cfg.FeedConfig.(config.SolanaFeedConfig)
if !ok {
Expand Down
4 changes: 2 additions & 2 deletions pkg/monitoring/source_txresults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ func TestTxResultsSource(t *testing.T) {
assert.Equal(t, txresultsType, factory.GetType())

// generate source
source, err := factory.NewSource(commonMonitoring.SourceParams{})
source, err := factory.NewSource(commonMonitoring.Params{})
assert.Error(t, err)
source, err = factory.NewSource(commonMonitoring.SourceParams{
source, err = factory.NewSource(commonMonitoring.Params{
FeedConfig: config.SolanaFeedConfig{
StateAccount: testutils.GeneratePublicKey(),
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitoring/testutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ type fakeSourceFactory struct {
}

func (f *fakeSourceFactory) NewSource(
_ commonMonitoring.SourceParams,
_ commonMonitoring.Params,
) (commonMonitoring.Source, error) {
return &fakeSource{f.log}, nil
}
Expand Down

0 comments on commit 70d2ca6

Please sign in to comment.