Skip to content

Commit 3d6b399

Browse files
committed
miner: fix prealloc
1 parent 7b43739 commit 3d6b399

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

miner/worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran
396396
if sidecar := tx.BlobTxSidecar(); sidecar != nil {
397397
if sidecar.Version == 0 {
398398
log.Info("Including blob tx with v0 sidecar, recomputing proofs", "hash", ltx.Hash)
399-
sidecar.Proofs = make([]kzg4844.Proof, 0)
399+
sidecar.Proofs = make([]kzg4844.Proof, 0, len(sidecar.Blobs)*kzg4844.CellProofsPerBlob)
400400
for _, blob := range sidecar.Blobs {
401401
cellProofs, err := kzg4844.ComputeCellProofs(&blob)
402402
if err != nil {

0 commit comments

Comments
 (0)