diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go index dbceb9c0f49..b3ec9a3d3bd 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go @@ -87,6 +87,6 @@ func (o *LogTriggersOptions) Defaults(finalityDepth int64) { o.LogLimitLow = 4 } if o.LogLimitHigh == 0 { - o.LogLimitHigh = o.LogLimitHigh * 2 + o.LogLimitHigh = o.LogLimitHigh * 10 } } diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go index e3454b6b84c..1618f695ccf 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/integration_test.go @@ -39,15 +39,16 @@ import ( func TestIntegration_LogEventProvider(t *testing.T) { tests := []struct { - name string - version string + name string + version string + limitLow, limitHigh int32 }{ - {"default version", ""}, - {"v1", "v1"}, + {"default version", "", 10, 100}, + {"v1", "v1", 10, 100}, } for _, tc := range tests { - bufferVersion := tc.version + bufferVersion, limitLow, limitHigh := tc.version, tc.limitLow, tc.limitHigh t.Run(tc.name, func(t *testing.T) { ctx, cancel := context.WithCancel(testutils.Context(t)) defer cancel() @@ -62,6 +63,8 @@ func TestIntegration_LogEventProvider(t *testing.T) { opts := logprovider.NewOptions(200) opts.ReadInterval = time.Second / 2 opts.BufferVersion = bufferVersion + opts.LogLimitLow = limitLow + opts.LogLimitHigh = limitHigh lp, ethClient := setupDependencies(t, db, backend) filterStore := logprovider.NewUpkeepFilterStore() @@ -215,15 +218,16 @@ func TestIntegration_LogEventProvider_UpdateConfig(t *testing.T) { func TestIntegration_LogEventProvider_Backfill(t *testing.T) { tests := []struct { - name string - bufferVersion string + name string + bufferVersion string + limitLow, limitHigh int32 }{ - {"default version", ""}, - {"v1", "v1"}, + {"default version", "", 10, 100}, + {"v1", "v1", 10, 100}, } for _, tc := range tests { - bufferVersion := tc.bufferVersion + bufferVersion, limitLow, limitHigh := tc.bufferVersion, tc.limitLow, tc.limitHigh t.Run(tc.name, func(t *testing.T) { ctx, cancel := context.WithTimeout(testutils.Context(t), time.Second*60) @@ -239,6 +243,9 @@ func TestIntegration_LogEventProvider_Backfill(t *testing.T) { opts := logprovider.NewOptions(200) opts.ReadInterval = time.Second / 4 opts.BufferVersion = bufferVersion + opts.LogLimitLow = limitLow + opts.LogLimitHigh = limitHigh + lp, ethClient := setupDependencies(t, db, backend) filterStore := logprovider.NewUpkeepFilterStore() provider, _ := setup(logger.TestLogger(t), lp, nil, nil, filterStore, &opts)