mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 00:39:26 +00:00
core/types: minimize this invalid intermediate state (#32241)
This commit is contained in:
parent
36c87a220e
commit
b2a0e08808
1 changed files with 3 additions and 2 deletions
|
|
@ -117,15 +117,16 @@ func (sc *BlobTxSidecar) ToV1() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if sc.Version == BlobSidecarVersion0 {
|
if sc.Version == BlobSidecarVersion0 {
|
||||||
sc.Proofs = make([]kzg4844.Proof, 0, len(sc.Blobs)*kzg4844.CellProofsPerBlob)
|
proofs := make([]kzg4844.Proof, 0, len(sc.Blobs)*kzg4844.CellProofsPerBlob)
|
||||||
for _, blob := range sc.Blobs {
|
for _, blob := range sc.Blobs {
|
||||||
cellProofs, err := kzg4844.ComputeCellProofs(&blob)
|
cellProofs, err := kzg4844.ComputeCellProofs(&blob)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
sc.Proofs = append(sc.Proofs, cellProofs...)
|
proofs = append(proofs, cellProofs...)
|
||||||
}
|
}
|
||||||
sc.Version = BlobSidecarVersion1
|
sc.Version = BlobSidecarVersion1
|
||||||
|
sc.Proofs = proofs
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue