Skip to content

Commit

Permalink
feat(consensus): Don't resubscribe upstream if pre-genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Jul 12, 2022
1 parent af18b3d commit 0a10f10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/exporter/consensus/beacon/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ func (n *node) ensureBeaconSubscription(ctx context.Context) error {
continue
}

// Don't resubscribe if we are pre-genesis.
if !time.Now().After(n.genesis.GenesisTime) {
continue
}

n.log.
WithField("last_event_time", n.lastEventTime.Local().String()).
Info("Haven't received any events for 5 minutes, re-subscribing")
Expand Down

0 comments on commit 0a10f10

Please sign in to comment.