From 933194d0bb8b70a498ad6504f76e3b2fa367660e Mon Sep 17 00:00:00 2001 From: Fergal Gribben Date: Fri, 19 Jul 2024 13:12:35 +0100 Subject: [PATCH] Clean up sync filters --- .../ocr2keeper/evmregistry/v21/logprovider/provider.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go index 69a4a16109b..f1de1ef5129 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/provider.go @@ -177,7 +177,7 @@ func (p *logEventProvider) Start(context.Context) error { for { select { case <-ticker.C: - if err := p.syncBufferFilters(); err != nil { + if err := p.buffer.SyncFilters(p.filterStore); err != nil { p.lggr.Warnw("failed to sync buffer filters", "err", err) } case <-ctx.Done(): @@ -500,10 +500,3 @@ func (p *logEventProvider) readLogs(ctx context.Context, latest int64, filters [ return merr } - -func (p *logEventProvider) syncBufferFilters() error { - p.lock.RLock() - defer p.lock.RUnlock() - - return p.buffer.SyncFilters(p.filterStore) -}