-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
core,eth,les: update unclean shutdown markers regularly #24077
Conversation
eth/backend.go
Outdated
func (s *Ethereum) updateUncleanShutdownMarkers() { | ||
// update marker every five minutes | ||
ticker := time.NewTicker(300 * time.Second) | ||
defer func() { ticker.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.
you can simplify the code by defer ticker.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.
LGTM
Updated based on the feedback I got on triage. |
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.
LGTM!
Package name 'node' is not great because it conflicts with the existing top-level package name we already have. Maybe call it 'shutdowncheck' or something. It doesn't need to be a good/short name. |
I wanted to make it more general so we could put other modules in there too. But yeah the name conflict wasn't great. I renamed it. |
Updated based on standup discussion. I could've avoided |
Fixes ethereum#22580 Co-authored-by: Felix Lange <fjl@twurst.com>
Successor to #22974, fixes #22580