From 27eef3e8c3aac5d168ed5410fc8e39dfd411c8c6 Mon Sep 17 00:00:00 2001 From: Somnath Banerjee Date: Thu, 30 Jan 2025 01:44:16 +0400 Subject: [PATCH] core/types: Rename to yParity in JsonAuthorization --- core/types/transaction_marshalling.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/types/transaction_marshalling.go b/core/types/transaction_marshalling.go index c4309caba69..639a950a36a 100644 --- a/core/types/transaction_marshalling.go +++ b/core/types/transaction_marshalling.go @@ -71,7 +71,7 @@ type JsonAuthorization struct { ChainID hexutil.Big `json:"chainId"` Address libcommon.Address `json:"address"` Nonce hexutil.Uint64 `json:"nonce"` - V hexutil.Uint64 `json:"v"` + YParity hexutil.Uint64 `json:"yParity"` R hexutil.Big `json:"r"` S hexutil.Big `json:"s"` } @@ -81,7 +81,7 @@ func (a JsonAuthorization) FromAuthorization(authorization Authorization) JsonAu a.Address = authorization.Address a.Nonce = (hexutil.Uint64)(authorization.Nonce) - a.V = (hexutil.Uint64)(authorization.YParity) + a.YParity = (hexutil.Uint64)(authorization.YParity) a.R = hexutil.Big(*authorization.R.ToBig()) a.S = hexutil.Big(*authorization.S.ToBig()) return a @@ -97,7 +97,7 @@ func (a JsonAuthorization) ToAuthorization() (Authorization, error) { return auth, errors.New("chainId in authorization does not fit in 256 bits") } auth.ChainID = *chainId - yParity := a.V.Uint64() + yParity := a.YParity.Uint64() if yParity >= 1<<8 { return auth, errors.New("y parity in authorization does not fit in 8 bits") }