-
Notifications
You must be signed in to change notification settings - Fork 108
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
eth/executionclient: rate limit multi client Healthy call #2010
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files☔ View full report in Codecov by Sentry. |
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
@@ -71,6 +71,7 @@ type MultiClient struct { | |||
clientsMu []sync.Mutex // clientsMu allow for lazy initialization of each client in `clients` slice in thread-safe manner (atomically) | |||
clients []SingleClientProvider // nil if not connected | |||
currentClientIndex atomic.Int64 | |||
lastHealthy atomic.Int64 |
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.
maybe lastHealthy
-> lastHealthyTimestamp
(or lastHealthyTsUnix
)
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.
IMO both are fine,Timestamp
and TsUnix
indicate what kind of data is stored, but when time is stored as an int, it's common that it's a timestamp
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.
I mean, it could mean slot number for all I know (without looking up how it's used) - but since it's minor implementation detail it's no big deal
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.
yeah, I agree, I didn't think about the slot. Well, if it causes any confusion, let's rename it in the future
No limit overloads the node