Skip to content

Commit

Permalink
constant added
Browse files Browse the repository at this point in the history
  • Loading branch information
JonWong203 committed Jul 27, 2023
1 parent 6a9b5b7 commit 69829a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
1 change: 0 additions & 1 deletion core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,6 @@ func (d *Delegate) newServicesOCR2Keepers(
endpoint,
hb,
customTelemLogger,
50,
)

return []job.ServiceCtx{
Expand Down
30 changes: 16 additions & 14 deletions core/services/ocr2/plugins/ocr2keeper/custom_telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,28 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/utils"
)

const (
customTelemChanSize = 100
)

type AutomationCustomTelemetryService struct {
utils.StartStopOnce
monitoringEndpoint commontypes.MonitoringEndpoint
headBroadcaster httypes.HeadBroadcaster
headCh chan blockKey
customTelemChanSize uint8
unsubscribe func()
chDone chan struct{}
lggr logger.Logger
monitoringEndpoint commontypes.MonitoringEndpoint
headBroadcaster httypes.HeadBroadcaster
headCh chan blockKey
unsubscribe func()
chDone chan struct{}
lggr logger.Logger
}

// NewAutomationCustomTelemetryService creates a telemetry service for new blocks and node version
func NewAutomationCustomTelemetryService(me commontypes.MonitoringEndpoint, hb httypes.HeadBroadcaster, lggr logger.Logger, customTelemChanSize uint8) *AutomationCustomTelemetryService {
func NewAutomationCustomTelemetryService(me commontypes.MonitoringEndpoint, hb httypes.HeadBroadcaster, lggr logger.Logger) *AutomationCustomTelemetryService {
return &AutomationCustomTelemetryService{
monitoringEndpoint: me,
headBroadcaster: hb,
headCh: make(chan blockKey, customTelemChanSize),
customTelemChanSize: customTelemChanSize,
chDone: make(chan struct{}),
lggr: lggr.Named("Automation Custom Telem"),
monitoringEndpoint: me,
headBroadcaster: hb,
headCh: make(chan blockKey, customTelemChanSize),
chDone: make(chan struct{}),
lggr: lggr.Named("Automation Custom Telem"),
}
}

Expand Down

0 comments on commit 69829a6

Please sign in to comment.