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

Make local block filter return empty list when when no blocks mined #1255

Merged
merged 3 commits into from
Nov 8, 2019

Conversation

dylanjw
Copy link
Contributor

@dylanjw dylanjw commented Feb 23, 2019

What was wrong?

Related to Issue #1253

Cute Animal Picture

image

@dylanjw
Copy link
Contributor Author

dylanjw commented Apr 2, 2019

@kclowes @njgheorghita Do either of you have a moment to review this?

@@ -277,6 +277,8 @@ def get_filter_changes(self):
@to_list
def block_hashes_in_range(w3, block_range):
from_block, to_block = block_range
if from_block is None or to_block is None:
return None
Copy link
Member

Choose a reason for hiding this comment

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

I think this should just be return. The value from a return statement in a generator doesn't actually get returned.

Copy link
Member

Choose a reason for hiding this comment

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

If we get flake8-bugbear added to the lint run for this repo it will catch things like this (by explicitely enabling B901)

Copy link
Collaborator

@kclowes kclowes left a comment

Choose a reason for hiding this comment

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

Thanks @dylanjw! Sorry this got lost! 😳

@kclowes kclowes merged commit c268b87 into ethereum:master Nov 8, 2019
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.

3 participants