File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 22
33from typing import Dict
44
5- from pydantic import AliasChoices , Field , model_serializer
5+ from pydantic import AliasChoices , Field
66
77from ethereum_test_base_types import (
88 BlobSchedule ,
@@ -57,18 +57,6 @@ def from_authorization_tuple(
5757 """Return FixtureAuthorizationTuple from an AuthorizationTuple."""
5858 return cls (** auth_tuple .model_dump ())
5959
60- @model_serializer (mode = "wrap" , when_used = "json-unless-none" )
61- def duplicate_v_as_y_parity (self , serializer ):
62- """
63- Add a duplicate 'yParity' field (same as `v`) in JSON fixtures.
64-
65- Background: https://github.com/erigontech/erigon/issues/14073
66- """
67- data = serializer (self )
68- if "v" in data and data ["v" ] is not None :
69- data ["yParity" ] = data ["v" ]
70- return data
71-
7260 def sign (self ):
7361 """Sign the current object for further serialization."""
7462 # No-op, as the object is always already signed
Original file line number Diff line number Diff line change @@ -461,6 +461,18 @@ def get_rlp_signing_prefix(self) -> bytes:
461461 """
462462 return self .magic .to_bytes (1 , byteorder = "big" )
463463
464+ @model_serializer (mode = "wrap" , when_used = "json-unless-none" )
465+ def duplicate_v_as_y_parity (self , serializer ):
466+ """
467+ Add a duplicate 'yParity' field (same as `v`) in JSON fixtures.
468+
469+ Background: https://github.com/erigontech/erigon/issues/14073
470+ """
471+ data = serializer (self )
472+ if "v" in data and data ["v" ] is not None :
473+ data ["yParity" ] = data ["v" ]
474+ return data
475+
464476
465477class AuthorizationTuple (AuthorizationTupleGeneric [HexNumber ]):
466478 """Authorization tuple for transactions."""
You can’t perform that action at this time.
0 commit comments