You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Responses for pending blocks miss a bunch of fields, thus making it impossible to deserialize them without introducing many Options on RPC block types.
Possible solution could be to introduce a less restrictive type for pending blocks + separate methods for fetching those on Provider. After that we can disallow fetching pending blocks through provider.get_block_by_number, and use complete type for those responses.
The text was updated successfully, but these errors were encountered:
After that we can disallow fetching pending blocks through provider.get_block_by_number, and use complete type for those responses.
this could be pretty invasive because then we'd need a new BlockNumberOrTag call.
what we could also do is just deserialize the pending block response differently, I'm fine with using default for the missing fields, not super great but simpler than introducing a block type just for pending.
ref #1106 (comment)
Responses for pending blocks miss a bunch of fields, thus making it impossible to deserialize them without introducing many
Option
s on RPC block types.Possible solution could be to introduce a less restrictive type for pending blocks + separate methods for fetching those on
Provider
. After that we can disallow fetching pending blocks throughprovider.get_block_by_number
, and use complete type for those responses.The text was updated successfully, but these errors were encountered: