diff --git a/core/services/ocr2/plugins/ocr2keeper/evm21/upkeepstate/store.go b/core/services/ocr2/plugins/ocr2keeper/evm21/upkeepstate/store.go index cd123212376..34bd6822d69 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evm21/upkeepstate/store.go +++ b/core/services/ocr2/plugins/ocr2keeper/evm21/upkeepstate/store.go @@ -132,9 +132,8 @@ func (u *upkeepStateStore) Start(pctx context.Context) error { } func (u *upkeepStateStore) flush(ctx context.Context) { - cloneRecords := make([]persistedStateRecord, len(u.pendingRecords)) - u.mu.Lock() + cloneRecords := make([]persistedStateRecord, len(u.pendingRecords)) copy(cloneRecords, u.pendingRecords) u.pendingRecords = []persistedStateRecord{} u.mu.Unlock()