From 74e82081e8515da6348fe1570b5aca31ffeb5d8d Mon Sep 17 00:00:00 2001 From: Matthew Pendrey Date: Tue, 26 Nov 2024 10:35:59 +0000 Subject: [PATCH] review comment --- core/services/workflows/syncer/workflow_registry.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/services/workflows/syncer/workflow_registry.go b/core/services/workflows/syncer/workflow_registry.go index 9369c95c696..219a5ec6c5b 100644 --- a/core/services/workflows/syncer/workflow_registry.go +++ b/core/services/workflows/syncer/workflow_registry.go @@ -96,8 +96,6 @@ type WorkflowRegistryEventResponse struct { // WorkflowEventPollerConfig is the configuration needed to poll for events on a contract. Currently // requires the ContractEventName. -// -// TODO(mstreet3): Use LookbackBlocks instead of StartBlockNum type WorkflowEventPollerConfig struct { QueryCount uint64 } @@ -284,7 +282,7 @@ func (w *workflowRegistry) loadWorkflows(ctx context.Context) (*types.Head, erro // and one for handling the events. func (w *workflowRegistry) Start(ctx context.Context) error { return w.StartOnce(w.Name(), func() error { - head, err := w.loadWorkflows(ctx) + loadWorkflowsHead, err := w.loadWorkflows(ctx) if err != nil { return fmt.Errorf("failed to load workflows: %w", err) } @@ -296,7 +294,7 @@ func (w *workflowRegistry) Start(ctx context.Context) error { defer w.wg.Done() defer cancel() - w.syncEventsLoop(ctx, head.Height) + w.syncEventsLoop(ctx, loadWorkflowsHead.Height) }() w.wg.Add(1)