From 2ef8c3c5a06a24a6c6adab6e10e8c13c781e5fb0 Mon Sep 17 00:00:00 2001 From: Roberto Bayardo Date: Fri, 27 Jan 2023 03:00:17 -0800 Subject: [PATCH] fix bug in json unmarshaling missing blob tx datagas field --- core/types/transaction_marshalling.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types/transaction_marshalling.go b/core/types/transaction_marshalling.go index 2c124b8ede06..093de2bd92ab 100644 --- a/core/types/transaction_marshalling.go +++ b/core/types/transaction_marshalling.go @@ -349,10 +349,10 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error { return err } } - itx.Message.MaxFeePerDataGas.SetFromBig((*big.Int)(dec.MaxFeePerDataGas)) if dec.MaxFeePerDataGas == nil { return errors.New("missing required field 'maxFeePerDataGas' for txdata") } + itx.Message.MaxFeePerDataGas.SetFromBig((*big.Int)(dec.MaxFeePerDataGas)) itx.Message.BlobVersionedHashes = dec.BlobVersionedHashes // A BlobTx may not contain data if len(dec.Blobs) != 0 || len(dec.BlobKzgs) != 0 {