Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit 45296c0

Browse files
authored
Cherry-pick #3735: Wait the state to be synced when starting aggregator (#3759)
* Wait the state to be synced when starting (#3735) * remove continue
1 parent 9b315a1 commit 45296c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

aggregator/aggregator.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ func (a *Aggregator) Start(ctx context.Context) error {
121121
return fmt.Errorf("failed to initialize proofs cache %w", err)
122122
}
123123

124+
for !a.isSynced(ctx, nil) {
125+
log.Info("Waiting for synchronizer to sync...")
126+
time.Sleep(a.cfg.RetryTime.Duration)
127+
}
128+
124129
address := fmt.Sprintf("%s:%d", a.cfg.Host, a.cfg.Port)
125130
lis, err := net.Listen("tcp", address)
126131
if err != nil {

0 commit comments

Comments
 (0)