mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-04 22:18:40 +00:00
core/types: BlobHashes should iterate Commitments (#35109)
Previously was iterating Blobs, but that could cause panic if the sidecar is malformed.
This commit is contained in:
parent
dcf6d0c135
commit
f5c62d0552
1 changed files with 1 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ func NewBlobTxSidecar(version byte, blobs []kzg4844.Blob, commitments []kzg4844.
|
|||
func (sc *BlobTxSidecar) BlobHashes() []common.Hash {
|
||||
hasher := sha256.New()
|
||||
h := make([]common.Hash, len(sc.Commitments))
|
||||
for i := range sc.Blobs {
|
||||
for i := range sc.Commitments {
|
||||
h[i] = kzg4844.CalcBlobHashV1(hasher, &sc.Commitments[i])
|
||||
}
|
||||
return h
|
||||
|
|
|
|||
Loading…
Reference in a new issue