Skip to content

Commit

Permalink
Merge pull request #1008 from gobitfly/BEDS-397/handle_upcoming_propo…
Browse files Browse the repository at this point in the history
…sals_in_data_access

fix(notifications): properly handle upcoming proposals in data access
  • Loading branch information
peterbitfly authored Oct 22, 2024
2 parents c8028a5 + 340ad12 commit c364333
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions backend/pkg/api/data_access/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,15 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
continue
}
notificationDetails.AttestationMissed = append(notificationDetails.AttestationMissed, t.IndexEpoch{Index: curNotification.ValidatorIndex, Epoch: curNotification.Epoch})
case types.ValidatorUpcomingProposalEventName:
curNotification, ok := notification.(*n.ValidatorUpcomingProposalNotification)
if !ok {
return nil, fmt.Errorf("failed to cast notification to ValidatorUpcomingProposalNotification")
}
if searchEnabled && !searchIndexSet[curNotification.ValidatorIndex] {
continue
}
notificationDetails.UpcomingProposals = append(notificationDetails.UpcomingProposals, t.IndexSlots{Index: curNotification.ValidatorIndex, Slots: []uint64{curNotification.Slot}})
case types.ValidatorGotSlashedEventName:
curNotification, ok := notification.(*n.ValidatorGotSlashedNotification)
if !ok {
Expand Down

0 comments on commit c364333

Please sign in to comment.