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

address local_filter_middleware bug #1632

Merged
merged 1 commit into from
Apr 30, 2020

Conversation

wolovim
Copy link
Member

@wolovim wolovim commented Apr 27, 2020

What was wrong?

FIlters are unable to parse for new log events with local_filter_middleware registered. (Closes #1514)

How was it fixed?

The iter_latest_block method in the middleware threw a StopIteration exception when the latest block was beyond the to_block. Devoid of context, this seems appropriate, but there seemed to be no advantage to this implementation practically. I updated this 'out of bounds' query to return None instead, which makes upstream methods happy without additional code changes. If this is egregiously unpythonic and another solution is recommended, let me know.

Todo:

Cute Animal Picture

@wolovim wolovim force-pushed the local-filter-middleware-bug branch from 01d1b2a to fa6da3a Compare April 27, 2020 20:11
pipermerriam
pipermerriam previously approved these changes Apr 28, 2020
@wolovim wolovim force-pushed the local-filter-middleware-bug branch 2 times, most recently from 6853910 to e5c6cc5 Compare April 28, 2020 19:52
@wolovim wolovim force-pushed the local-filter-middleware-bug branch from e5c6cc5 to 4aaaaf4 Compare April 28, 2020 19:53
@wolovim wolovim changed the title WIP: address local_filter_middleware bug address local_filter_middleware bug Apr 29, 2020
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.

Looks good to me! 🚀

@wolovim wolovim merged commit c159e80 into ethereum:master Apr 30, 2020
@wolovim wolovim deleted the local-filter-middleware-bug branch April 30, 2020 20:43
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.

local_filter_middleware doesn't work with geth nodes
3 participants