From 70d2ca683e0c7442215d275795aebe227714790f Mon Sep 17 00:00:00 2001 From: aalu1418 <50029043+aalu1418@users.noreply.github.com> Date: Thu, 11 Apr 2024 07:33:05 -0600 Subject: [PATCH] fix renaming params --- go.mod | 2 +- go.sum | 4 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- pkg/monitoring/exporter/feedbalances.go | 2 +- pkg/monitoring/exporter/feedbalances_test.go | 2 +- pkg/monitoring/exporter/nodebalances.go | 2 +- pkg/monitoring/exporter/nodebalances_test.go | 2 +- pkg/monitoring/source_balances_test.go | 6 +++--- pkg/monitoring/source_envelope.go | 2 +- pkg/monitoring/source_envelope_test.go | 2 +- pkg/monitoring/source_feed_balances.go | 2 +- pkg/monitoring/source_node_balances.go | 2 +- pkg/monitoring/source_txresults.go | 2 +- pkg/monitoring/source_txresults_test.go | 4 ++-- pkg/monitoring/testutils/testutils.go | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/go.mod b/go.mod index 4d273f118..e0e4db4b9 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 4131427d7..8f1eb546d 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index ad3d37002..94aabc005 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -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 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index d5f43062e..5aaa71d9b 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -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= diff --git a/pkg/monitoring/exporter/feedbalances.go b/pkg/monitoring/exporter/feedbalances.go index 75f5c276a..73a34b244 100644 --- a/pkg/monitoring/exporter/feedbalances.go +++ b/pkg/monitoring/exporter/feedbalances.go @@ -27,7 +27,7 @@ type feedBalancesFactory struct { } func (p *feedBalancesFactory) NewExporter( - params commonMonitoring.ExporterParams, + params commonMonitoring.Params, ) (commonMonitoring.Exporter, error) { return &feeBalances{ params.ChainConfig, diff --git a/pkg/monitoring/exporter/feedbalances_test.go b/pkg/monitoring/exporter/feedbalances_test.go index 62ebc488a..aece3564f 100644 --- a/pkg/monitoring/exporter/feedbalances_test.go +++ b/pkg/monitoring/exporter/feedbalances_test.go @@ -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() diff --git a/pkg/monitoring/exporter/nodebalances.go b/pkg/monitoring/exporter/nodebalances.go index 30b221594..6ae850e99 100644 --- a/pkg/monitoring/exporter/nodebalances.go +++ b/pkg/monitoring/exporter/nodebalances.go @@ -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") } diff --git a/pkg/monitoring/exporter/nodebalances_test.go b/pkg/monitoring/exporter/nodebalances_test.go index a9ed6ca30..b2c79fd94 100644 --- a/pkg/monitoring/exporter/nodebalances_test.go +++ b/pkg/monitoring/exporter/nodebalances_test.go @@ -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 diff --git a/pkg/monitoring/source_balances_test.go b/pkg/monitoring/source_balances_test.go index f41d76d40..1acbfd7d5 100644 --- a/pkg/monitoring/source_balances_test.go +++ b/pkg/monitoring/source_balances_test.go @@ -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(), @@ -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(), diff --git a/pkg/monitoring/source_envelope.go b/pkg/monitoring/source_envelope.go index c84328ee7..84a79d50c 100644 --- a/pkg/monitoring/source_envelope.go +++ b/pkg/monitoring/source_envelope.go @@ -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 { diff --git a/pkg/monitoring/source_envelope_test.go b/pkg/monitoring/source_envelope_test.go index f1ecb607f..6e8c636f4 100644 --- a/pkg/monitoring/source_envelope_test.go +++ b/pkg/monitoring/source_envelope_test.go @@ -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, }) diff --git a/pkg/monitoring/source_feed_balances.go b/pkg/monitoring/source_feed_balances.go index f2ae43497..b935083d1 100644 --- a/pkg/monitoring/source_feed_balances.go +++ b/pkg/monitoring/source_feed_balances.go @@ -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) diff --git a/pkg/monitoring/source_node_balances.go b/pkg/monitoring/source_node_balances.go index 78f499e2f..1bc7e0712 100644 --- a/pkg/monitoring/source_node_balances.go +++ b/pkg/monitoring/source_node_balances.go @@ -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) diff --git a/pkg/monitoring/source_txresults.go b/pkg/monitoring/source_txresults.go index 82ec7f9cf..348e5514e 100644 --- a/pkg/monitoring/source_txresults.go +++ b/pkg/monitoring/source_txresults.go @@ -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 { diff --git a/pkg/monitoring/source_txresults_test.go b/pkg/monitoring/source_txresults_test.go index 477606196..0e55bae7f 100644 --- a/pkg/monitoring/source_txresults_test.go +++ b/pkg/monitoring/source_txresults_test.go @@ -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(), }, diff --git a/pkg/monitoring/testutils/testutils.go b/pkg/monitoring/testutils/testutils.go index c1926a7a2..01e1b7956 100644 --- a/pkg/monitoring/testutils/testutils.go +++ b/pkg/monitoring/testutils/testutils.go @@ -126,7 +126,7 @@ type fakeSourceFactory struct { } func (f *fakeSourceFactory) NewSource( - _ commonMonitoring.SourceParams, + _ commonMonitoring.Params, ) (commonMonitoring.Source, error) { return &fakeSource{f.log}, nil }