Skip to content

Commit

Permalink
feature: Add block header field metadata (#217)
Browse files Browse the repository at this point in the history
* types/json: add extra assert

* types: add block header field metadata

* types: fix header field collection on `None`

* types: remove default values from optional header fields

* tools: fix names

* Update src/ethereum_test_tools/common/types.py

Co-authored-by: Spencer Taylor-Brown <spencer@spencertaylorbrown.uk>

---------

Co-authored-by: Spencer Taylor-Brown <spencer@spencertaylorbrown.uk>
  • Loading branch information
marioevz and spencer-tb authored Jul 26, 2023
1 parent 30f53cd commit d5ec094
Show file tree
Hide file tree
Showing 4 changed files with 315 additions and 94 deletions.
1 change: 1 addition & 0 deletions src/ethereum_test_tools/common/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def field(*args, json_encoder: Optional[JSONEncoder.Field] = None, **kwargs) ->
metadata = kwargs["metadata"]
else:
metadata = {}
assert isinstance(metadata, dict)

if json_encoder is not None:
metadata["json_encoder"] = json_encoder
Expand Down
Loading

0 comments on commit d5ec094

Please sign in to comment.