Skip to content

Commit

Permalink
fixing bug where an attempt to format logsBloom to hexbytes fails whe…
Browse files Browse the repository at this point in the history
…n logsBloom is null
  • Loading branch information
enjeyw authored and kclowes committed Sep 19, 2019
1 parent d8ab27a commit 6f9889a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions newsfragments/1445.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add null check to logsbloom formatter
2 changes: 1 addition & 1 deletion web3/middleware/pythonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def to_hexbytes(num_bytes, val, variable_length=False):
'size': to_integer_if_hex,
'timestamp': to_integer_if_hex,
'hash': apply_formatter_if(is_not_null, to_hexbytes(32)),
'logsBloom': to_hexbytes(256),
'logsBloom': apply_formatter_if(is_not_null, to_hexbytes(256)),
'miner': apply_formatter_if(is_not_null, to_checksum_address),
'mixHash': to_hexbytes(32),
'nonce': apply_formatter_if(is_not_null, to_hexbytes(8, variable_length=True)),
Expand Down

0 comments on commit 6f9889a

Please sign in to comment.