core/types: fix length of BlobVersionedHashed can not be zero (#35065)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

check the len of BlobVersionedHashed in blob tx.
This commit is contained in:
cui 2026-06-04 05:51:27 +08:00 committed by GitHub
parent 369521becb
commit 7835a71dae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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