Skip to content

Commit

Permalink
Merge pull request ethereum#94 from mdehoog/json-bug
Browse files Browse the repository at this point in the history
fix bug in json unmarshaling missing blob tx datagas field
  • Loading branch information
roberto-bayardo authored Jan 27, 2023
2 parents 20d3ce8 + 2ef8c3c commit 5e5214d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/types/transaction_marshalling.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5e5214d

Please sign in to comment.