From 8e0b2c609c717528eb121f84a93a76a3e64293d9 Mon Sep 17 00:00:00 2001 From: devopsbo3 <69951731+devopsbo3@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:27:53 -0600 Subject: [PATCH] Revert "core/types: fix unmarshalling of BlobTx values (#27939)" This reverts commit 93dbe130dd9f08edf51cbc1e4d02036ccceaf420. --- core/types/transaction_marshalling.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/types/transaction_marshalling.go b/core/types/transaction_marshalling.go index e5d71a85d6..1378cb4014 100644 --- a/core/types/transaction_marshalling.go +++ b/core/types/transaction_marshalling.go @@ -373,20 +373,20 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error { itx.BlobHashes = dec.BlobVersionedHashes // signature R - var overflow bool + var ok bool if dec.R == nil { return errors.New("missing required field 'r' in transaction") } - itx.R, overflow = uint256.FromBig((*big.Int)(dec.R)) - if overflow { + itx.R, ok = uint256.FromBig((*big.Int)(dec.R)) + if !ok { return errors.New("'r' value overflows uint256") } // signature S if dec.S == nil { return errors.New("missing required field 's' in transaction") } - itx.S, overflow = uint256.FromBig((*big.Int)(dec.S)) - if overflow { + itx.S, ok = uint256.FromBig((*big.Int)(dec.S)) + if !ok { return errors.New("'s' value overflows uint256") } // signature V @@ -394,8 +394,8 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error { if err != nil { return err } - itx.V, overflow = uint256.FromBig(vbig) - if overflow { + itx.V, ok = uint256.FromBig(vbig) + if !ok { return errors.New("'v' value overflows uint256") } if itx.V.Sign() != 0 || itx.R.Sign() != 0 || itx.S.Sign() != 0 {