mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-17 00:20:39 +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
|
||||
}
|
||||
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 {
|
||||
cellProofs, err := kzg4844.ComputeCellProofs(&blob)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
sc.Proofs = append(sc.Proofs, cellProofs...)
|
||||
proofs = append(proofs, cellProofs...)
|
||||
}
|
||||
sc.Version = BlobSidecarVersion1
|
||||
sc.Proofs = proofs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue