diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index fac03c0df2..ea4c44e8e6 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -121,6 +121,11 @@ func (a *Aggregator) Start(ctx context.Context) error { return fmt.Errorf("failed to initialize proofs cache %w", err) } + for !a.isSynced(ctx, nil) { + log.Info("Waiting for synchronizer to sync...") + time.Sleep(a.cfg.RetryTime.Duration) + } + address := fmt.Sprintf("%s:%d", a.cfg.Host, a.cfg.Port) lis, err := net.Listen("tcp", address) if err != nil {