diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury.go index fa8909c7708..6702e02e73d 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury.go @@ -46,8 +46,8 @@ var GenerateHMACFn = func(method string, path string, body []byte, clientId stri return userHmac } -// CalculateRetryConfig returns plugin retry interval based on how many times plugin has retried this work -var CalculateRetryConfigFn = func(upkeepType automationTypes.UpkeepType, prk string, mercuryConfig MercuryConfigProvider) (retryInterval time.Duration) { +// CalculateStreamsRetryConfig returns plugin retry interval based on how many times plugin has retried this work +var CalculateStreamsRetryConfigFn = func(upkeepType automationTypes.UpkeepType, prk string, mercuryConfig MercuryConfigProvider) (retryInterval time.Duration) { var retries int totalAttempts, ok := mercuryConfig.GetPluginRetry(prk) if ok { diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury_test.go index ef4ba4b1d3f..200c26482bc 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/mercury_test.go @@ -284,7 +284,7 @@ func Test_CalculateRetryConfigFn(t *testing.T) { cfg := newMercuryConfigMock() var result time.Duration for i := 0; i < tc.times; i++ { - result = CalculateRetryConfigFn(automationTypes.ConditionTrigger, "prk", cfg) + result = CalculateStreamsRetryConfigFn(automationTypes.ConditionTrigger, "prk", cfg) } assert.Equal(t, tc.expected, result) }) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v02/request.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v02/request.go index cd2d2db05a5..44205491e1b 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v02/request.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v02/request.go @@ -108,7 +108,7 @@ func (c *client) DoRequest(ctx context.Context, streamsLookup *mercury.StreamsLo return state, nil, errCode, retryable, 0 * time.Second, reqErr } // If errors were retryable then calculate retry interval - retryInterval := mercury.CalculateRetryConfigFn(upkeepType, pluginRetryKey, c.mercuryConfig) + retryInterval := mercury.CalculateStreamsRetryConfigFn(upkeepType, pluginRetryKey, c.mercuryConfig) if retryInterval != mercury.RetryIntervalTimeout { // Return the retyrable state with appropriate retry interval return state, nil, errCode, retryable, retryInterval, reqErr diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/request.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/request.go index 66cdcce35ad..15a6e16766d 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/request.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mercury/v03/request.go @@ -81,7 +81,7 @@ func (c *client) DoRequest(ctx context.Context, streamsLookup *mercury.StreamsLo return m.State, nil, m.ErrCode, m.Retryable, 0 * time.Second, m.Error } // If errors were retryable then calculate retry interval - retryInterval := mercury.CalculateRetryConfigFn(upkeepType, pluginRetryKey, c.mercuryConfig) + retryInterval := mercury.CalculateStreamsRetryConfigFn(upkeepType, pluginRetryKey, c.mercuryConfig) if retryInterval != mercury.RetryIntervalTimeout { // Return the retyrable state with appropriate retry interval return m.State, nil, m.ErrCode, m.Retryable, retryInterval, m.Error