Skip to content

Commit

Permalink
fix synchronizer error if no client is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Aug 9, 2024
1 parent f50b9d8 commit 3cedab5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions indexer/beacon/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ func (sync *synchronizer) runSync() {
// synchronize next epoch
syncEpoch := sync.currentEpoch
syncClients := sync.getSyncClients(syncEpoch)
if len(syncClients) == 0 {
sync.logger.Warnf("no clients available for synchronization of epoch %v", syncEpoch)

// wait for 10 seconds before retrying
time.Sleep(10 * time.Second)
continue
}

if syncEpoch >= sync.indexer.lastFinalizedEpoch {
isComplete = true
Expand Down

0 comments on commit 3cedab5

Please sign in to comment.