Skip to content

Conversation

@amirbaer
Copy link

@amirbaer amirbaer commented Sep 2, 2018

What was wrong?

Related to Issue #1039

How was it fixed?

By fixing the syntax (as detailed in issue #1039).
I could not think of any other possible implications.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@pipermerriam
Copy link
Member

doctest failure is unrelated and was fixed in #1038

@pipermerriam pipermerriam merged commit 38b0303 into ethereum:master Sep 3, 2018
elif block_identifier in ['latest', 'earliest', 'pending']:
return block_identifier
elif isinstance(block_identifier, bytes) or is_hex_encoded_block_hash(block_identifier):
return web3.eth.getBlock(block_identifier).number
Copy link
Member

Choose a reason for hiding this comment

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

cc @dylanjw @carver @voith just in case you don't see this. This is a good example of why we should be as diligent as possible to not assume the AttributeDict API is usable within our own web3 apis. Forgive me for preaching to the choir if you're already aware.

Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW, replacing all the middlewares as the user did in #1039 is almost definitely not what they wanted to do. There will be a lot of things that work incorrectly, like: fields won't be converted to and from python native types. I'm not suggesting that we should encourage attribute syntax, but this is only one of many things that will work in unexpected ways if the user drops all the middleware.

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