Skip to content

Commit 41634e6

Browse files
committed
core/types: qf
1 parent 79385a4 commit 41634e6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/types/tx_blob.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import (
2222
"fmt"
2323
"math/big"
2424

25+
"slices"
26+
2527
"github.com/ethereum/go-ethereum/common"
2628
"github.com/ethereum/go-ethereum/crypto/kzg4844"
2729
"github.com/ethereum/go-ethereum/params"
@@ -181,9 +183,9 @@ func (tx *BlobTx) copy() TxData {
181183
}
182184
if tx.Sidecar != nil {
183185
cpy.Sidecar = &BlobTxSidecar{
184-
Blobs: append([]kzg4844.Blob(nil), tx.Sidecar.Blobs...),
185-
Commitments: append([]kzg4844.Commitment(nil), tx.Sidecar.Commitments...),
186-
Proofs: append([]kzg4844.Proof(nil), tx.Sidecar.Proofs...),
186+
Blobs: slices.Clone(tx.Sidecar.Blobs),
187+
Commitments: slices.Clone(tx.Sidecar.Commitments),
188+
Proofs: slices.Clone(tx.Sidecar.Proofs),
187189
}
188190
}
189191
return cpy

0 commit comments

Comments
 (0)