mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-04 14:08:39 +00:00
core/types: fix length of BlobVersionedHashed can not be zero (#35065)
check the len of BlobVersionedHashed in blob tx.
This commit is contained in:
parent
369521becb
commit
7835a71dae
1 changed files with 3 additions and 0 deletions
|
|
@ -396,6 +396,9 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error {
|
|||
if dec.BlobVersionedHashes == nil {
|
||||
return errors.New("missing required field 'blobVersionedHashes' in transaction")
|
||||
}
|
||||
if len(dec.BlobVersionedHashes) == 0 {
|
||||
return errors.New("'blobVersionedHashes' must contain at least one hash")
|
||||
}
|
||||
itx.BlobHashes = dec.BlobVersionedHashes
|
||||
|
||||
// signature R
|
||||
|
|
|
|||
Loading…
Reference in a new issue