mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
check commitment conversion
This commit is contained in:
parent
4cc0f14c90
commit
0c58f4a559
1 changed files with 5 additions and 1 deletions
|
|
@ -206,7 +206,11 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal, timestamp u
|
||||||
if envelope.BlobsBundle != nil {
|
if envelope.BlobsBundle != nil {
|
||||||
hasher := sha256.New()
|
hasher := sha256.New()
|
||||||
for _, commit := range envelope.BlobsBundle.Commitments {
|
for _, commit := range envelope.BlobsBundle.Commitments {
|
||||||
c := kzg4844.Commitment(commit[:])
|
var c kzg4844.Commitment
|
||||||
|
if len(commit) != len(c) {
|
||||||
|
return errors.New("invalid commitment length")
|
||||||
|
}
|
||||||
|
copy(c[:], commit)
|
||||||
blobHashes = append(blobHashes, kzg4844.CalcBlobHashV1(hasher, &c))
|
blobHashes = append(blobHashes, kzg4844.CalcBlobHashV1(hasher, &c))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue