Skip to content

Commit

Permalink
Merge pull request #2818 from gobitfly/BIDS-2674/Wrong_epoch_number_f…
Browse files Browse the repository at this point in the history
…or_validator_offline_notification

(BIDS-2674) Use the InternalState instead of the EventEpoch
  • Loading branch information
Eisei24 authored Jan 31, 2024
2 parents 83c9593 + e953e04 commit 7162bbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func notificationCollector() {
latestFinalizedEpoch := LatestFinalizedEpoch()

if latestFinalizedEpoch < 4 {
logger.Errorf("pausing notifications until at least 4 epochs have been exported into the db")
logger.Errorf("pausing notifications until at least 5 epochs have been exported into the db")
time.Sleep(time.Minute)
continue
}
Expand Down Expand Up @@ -1675,9 +1675,9 @@ func (n *validatorIsOfflineNotification) GetEpoch() uint64 {
func (n *validatorIsOfflineNotification) GetInfo(includeUrl bool) string {
if n.IsOffline {
if includeUrl {
return fmt.Sprintf(`Validator <a href="https://%[3]v/validator/%[1]v">%[1]v</a> is offline since epoch <a href="https://%[3]v/epoch/%[2]v">%[2]v</a>).`, n.ValidatorIndex, n.EventEpoch, utils.Config.Frontend.SiteDomain)
return fmt.Sprintf(`Validator <a href="https://%[3]v/validator/%[1]v">%[1]v</a> is offline since epoch <a href="https://%[3]v/epoch/%[2]s">%[2]s</a>).`, n.ValidatorIndex, n.InternalState, utils.Config.Frontend.SiteDomain)
} else {
return fmt.Sprintf(`Validator %v is offline since epoch %v.`, n.ValidatorIndex, n.EventEpoch)
return fmt.Sprintf(`Validator %v is offline since epoch %s.`, n.ValidatorIndex, n.InternalState)
}
} else {
if includeUrl {
Expand Down

0 comments on commit 7162bbf

Please sign in to comment.