diff --git a/core/internal/mocks/application.go b/core/internal/mocks/application.go index f845d46ca8d..cbb8ebaaa04 100644 --- a/core/internal/mocks/application.go +++ b/core/internal/mocks/application.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks diff --git a/core/services/chainlink/config_head_report_test.go b/core/services/chainlink/config_head_report_test.go index b740c5fd7b2..1840c4f578b 100644 --- a/core/services/chainlink/config_head_report_test.go +++ b/core/services/chainlink/config_head_report_test.go @@ -1,8 +1,9 @@ package chainlink import ( - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func TestHeadReportConfig(t *testing.T) { diff --git a/core/services/chainlink/mocks/general_config.go b/core/services/chainlink/mocks/general_config.go index c7e224f4f2a..14af5ec9700 100644 --- a/core/services/chainlink/mocks/general_config.go +++ b/core/services/chainlink/mocks/general_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.42.2. DO NOT EDIT. +// Code generated by mockery v2.43.2. DO NOT EDIT. package mocks @@ -288,6 +288,26 @@ func (_m *GeneralConfig) FluxMonitor() config.FluxMonitor { return r0 } +// HeadReport provides a mock function with given fields: +func (_m *GeneralConfig) HeadReport() config.HeadReport { + ret := _m.Called() + + if len(ret) == 0 { + panic("no return value specified for HeadReport") + } + + var r0 config.HeadReport + if rf, ok := ret.Get(0).(func() config.HeadReport); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(config.HeadReport) + } + } + + return r0 +} + // Insecure provides a mock function with given fields: func (_m *GeneralConfig) Insecure() config.Insecure { ret := _m.Called() diff --git a/core/services/headreporter/head_reporter.go b/core/services/headreporter/head_reporter.go index 55e20e69916..b7eef5203b6 100644 --- a/core/services/headreporter/head_reporter.go +++ b/core/services/headreporter/head_reporter.go @@ -2,11 +2,12 @@ package headreporter import ( "context" + "sync" + "time" + "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/services/telemetry" - "sync" - "time" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" diff --git a/core/services/headreporter/head_reporter_test.go b/core/services/headreporter/head_reporter_test.go index 292ab8cf755..3e17a6d1673 100644 --- a/core/services/headreporter/head_reporter_test.go +++ b/core/services/headreporter/head_reporter_test.go @@ -1,6 +1,10 @@ package headreporter_test import ( + "sync/atomic" + "testing" + "time" + "github.com/smartcontractkit/chainlink/v2/core/internal/mocks" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" @@ -8,9 +12,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/headreporter" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "sync/atomic" - "testing" - "time" ) func Test_HeadReporterService(t *testing.T) { diff --git a/core/services/headreporter/prometheus_reporter.go b/core/services/headreporter/prometheus_reporter.go index fd3007797d3..4a0cac84fa6 100644 --- a/core/services/headreporter/prometheus_reporter.go +++ b/core/services/headreporter/prometheus_reporter.go @@ -3,6 +3,9 @@ package headreporter import ( "context" "fmt" + "math/big" + "time" + "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" @@ -13,8 +16,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/logger" "go.uber.org/multierr" - "math/big" - "time" ) type ( diff --git a/core/services/headreporter/telemetry_reporter.go b/core/services/headreporter/telemetry_reporter.go index 26e8c426749..a1f4282f8ff 100644 --- a/core/services/headreporter/telemetry_reporter.go +++ b/core/services/headreporter/telemetry_reporter.go @@ -2,6 +2,7 @@ package headreporter import ( "context" + evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/logger"