Skip to content
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

validator client on rest mode has an inappropriate context deadline for events #13771

Merged
merged 9 commits into from
Mar 20, 2024
5 changes: 4 additions & 1 deletion api/client/event/event_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ func (h *EventStream) Subscribe(eventsChannel chan<- *Event) {
var eventType, data string // Variables to store event type and data

// Iterate over lines of the event stream
for scanner.Scan() {
for {
if ok := scanner.Scan(); !ok {
break
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think so anymore I think I'll revert this

select {
case <-h.ctx.Done():
log.Info("Context canceled, stopping event stream")
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/rpc/eth/events/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ go_library(
"//runtime/version:go_default_library",
"//time/slots:go_default_library",
"@com_github_ethereum_go_ethereum//common/hexutil:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@io_opencensus_go//trace:go_default_library",
],
)
Expand Down
Loading
Loading