Skip to content

Commit

Permalink
Skip ejector if beacon syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo committed Dec 5, 2024
1 parent 00ac8e0 commit 13a51c7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions internal/application/services/validatorEjector.go
Original file line number Diff line number Diff line change
@@ -64,6 +64,17 @@ func (ve *ValidatorEjector) ValidatorEjectorCron(ctx context.Context, interval t
func (ve *ValidatorEjector) EjectValidator() error {
logger.DebugWithPrefix(ve.servicePrefix, "Validator Ejector cron started")

// skip if beacon syncing
syncStatus, err := ve.beaconchainPort.GetSyncingStatus()
if err != nil {
return err
}

if syncStatus {
logger.InfoWithPrefix(ve.servicePrefix, "Beaconchain is syncing, skipping validator ejector")
return nil
}

operatorIDs, err := ve.storagePort.GetOperatorIds()
if err != nil {
return err

0 comments on commit 13a51c7

Please sign in to comment.