Skip to content

Commit

Permalink
Merge pull request #146 from ethpandaops/feat/force-refresh
Browse files Browse the repository at this point in the history
feat: Check for finality every 3m
  • Loading branch information
samcm authored Dec 5, 2023
2 parents 4cda8b3 + f143029 commit ba717b0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/beacon/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ func (d *Default) startCrons(ctx context.Context) error {
return err
}

if _, err := s.Every("3m").Do(func() {
for _, node := range d.nodes.Healthy(ctx) {
if _, err := node.Beacon.FetchFinality(ctx, "head"); err != nil {
d.log.WithError(err).Error("Failed to fetch finality when polling")
}
}
}); err != nil {
return err
}

go func() {
if err := d.startGenesisLoop(ctx); err != nil {
d.log.WithError(err).Fatal("Failed to start genesis loop")
Expand Down

0 comments on commit ba717b0

Please sign in to comment.