-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
perf: break early on proxy detection when realize can't get storage #2514
perf: break early on proxy detection when realize can't get storage #2514
Conversation
networks.active_provider = init_provider | ||
|
||
assert actual is None # Because of provider. | ||
assert my_provider.times_get_storage_was_called == 1 |
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.
This is 4
on the main branch, so this test would fail without the fix
call `get_storage()` more than once. | ||
""" | ||
|
||
class MyProvider(LocalProvider): |
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 had to make a new provider because EthTester supports getting storage now, which is a good thing
24980c6
to
41572a6
Compare
41572a6
to
5648920
Compare
What I did
It breaks early instead of continues when it realized getting storage is not implemented by the provider.
I think all providers these days implement this RPC but if you find yourself in this situation, this would save you a few failing requests.
How I did it
How to verify it
Checklist