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

eth/filters: remove use of event.TypeMux for pending logs #20312

Merged
merged 9 commits into from
Dec 10, 2019

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Nov 18, 2019

This fixes the following staticcheck warnings:

eth/filters/api.go:56:13: SA1019: event.TypeMux is deprecated: use Feed  (staticcheck)
	mux       *event.TypeMux
	           ^
eth/filters/filter.go:35:14: SA1019: event.TypeMux is deprecated: use Feed  (staticcheck)
	EventMux() *event.TypeMux
	            ^
eth/filters/filter_system.go:92:13: SA1019: event.TypeMux is deprecated: use Feed  (staticcheck)
	mux       *event.TypeMux
	           ^
internal/ethapi/backend.go:46:14: SA1019: event.TypeMux is deprecated: use Feed  (staticcheck)
	EventMux() *event.TypeMux
	            ^
accounts/abi/bind/backends/simulated.go:79:42: SA1019: event.TypeMux is deprecated: use Feed  (staticcheck)
		events:     filters.NewEventSystem(new(event.TypeMux), &filterBackend{database, blockchain}, false),
		                                       ^
accounts/abi/bind/backends/simulated.go:467:38: SA1019: event.TypeMux is deprecated: use Feed  (staticcheck)
func (fb *filterBackend) EventMux() *event.TypeMux { panic("not supported") }
                                     ^

<-quit
return nil
})
return nullSubscription()
Copy link
Member

Choose a reason for hiding this comment

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

This looks really weird. Why do we have this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do this because returning a nil subscription is not allowed. nullSubscription returns a subscription that never sends anything.

@fjl
Copy link
Contributor Author

fjl commented Nov 21, 2019

@karalabe PTAL

Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM

JukLee0ira added a commit to JukLee0ira/XDPoSChain that referenced this pull request Jul 11, 2024
JukLee0ira added a commit to JukLee0ira/XDPoSChain that referenced this pull request Jul 23, 2024
JukLee0ira added a commit to JukLee0ira/XDPoSChain that referenced this pull request Aug 3, 2024
gzliudan pushed a commit to XinFinOrg/XDPoSChain that referenced this pull request Aug 3, 2024
wanwiset25 pushed a commit to XinFinOrg/XDPoSChain that referenced this pull request Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants