Skip to content

Commit f001efc

Browse files
authored
Merge pull request #25 from dappnode/marc/return-early-no-pubkeys
return early if brain responds with no pubkeys
2 parents 15095dd + 805e034 commit f001efc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/application/services/dutieschecker_service.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ func (a *DutiesChecker) performChecks(ctx context.Context, justifiedEpoch domain
6868
return err
6969
}
7070

71+
if len(pubkeys) == 0 {
72+
logger.Debug("No pubkeys found in brain for epoch %d, nothing to check.", justifiedEpoch)
73+
return nil
74+
}
75+
7176
indices, err := a.Beacon.GetValidatorIndicesByPubkeys(ctx, pubkeys)
7277
if err != nil {
7378
logger.Error("Error fetching validator indices from beacon node: %v", err)

0 commit comments

Comments
 (0)