-
Notifications
You must be signed in to change notification settings - Fork 2
Fix health report logic in listener #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
chains/heads/listener.go
Outdated
| var err error | ||
| if !l.ReceivingHeads() { | ||
| err = errors.New("Listener is not receiving heads") | ||
| err = errors.Join(err, errors.New("Listener is not receiving heads")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The var err is just declared above, and not used.
So it is really unnecessary to use Join here.
Anyways both New or Join work here, so can leave it whatever
| if noHeadsAlarmDuration > 0 { | ||
| noHeadsAlarmT = time.NewTicker(noHeadsAlarmDuration) | ||
| noHeadsAlarmC = noHeadsAlarmT.C | ||
| defer noHeadsAlarmT.Stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
1c991c8
59d2c59 to
1c991c8
Compare
Summary
HealthReporterror aggregationreceiveHeaders