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
thread 'main' panicked at 'called Result::unwrap() on an Err value: Decoder("Error("invalid type: null, expected a 0x-prefixed hex string with length of 512", line: 0, column: 0)")', src/main.rs:8:17
The problem seems to be that the RPC response for a pending block (parity client) contains null for logs_bloom (512 hex characters = 2048 bit) and this field is not optional on the Block struct.
Is there a reason for this? Do consumers expect logs_bloom to be always set? Would it be a valid change to make this field optional or could we alternatively tighten the interface to not allow querying block() for Pending?
The text was updated successfully, but these errors were encountered:
The Block struct in rust-web3 was based on the one returned by Parity Ethereum, but it was a long while ago. Seems that this change: https://github.com/openethereum/openethereum/pull/8281 was not reflected in web3 copy of the Block struct.
I think we should just change the logs_bloom to be an Option, PR welcome :)
The following example code:
Fails with the following error:
The problem seems to be that the RPC response for a pending block (parity client) contains
null
forlogs_bloom
(512 hex characters = 2048 bit) and this field is not optional on theBlock
struct.Is there a reason for this? Do consumers expect
logs_bloom
to be always set? Would it be a valid change to make this field optional or could we alternatively tighten the interface to not allow queryingblock()
forPending
?The text was updated successfully, but these errors were encountered: