Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit 45ed18c

Browse files
committed
core/types: BlockBodyExtra Copy leaves ExtData to nil if it's nil previously
1 parent 5b2e0cc commit 45ed18c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

core/types/block_ext.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ type BlockBodyExtra struct {
3232
// - [ethtypes.Block.WithWithdrawals]
3333
func (b *BlockBodyExtra) Copy() *BlockBodyExtra {
3434
cpy := *b
35-
if b.ExtData == nil {
36-
cpy.ExtData = &[]byte{}
37-
} else {
35+
if b.ExtData != nil {
3836
data := slices.Clone(*b.ExtData)
3937
cpy.ExtData = &data
4038
}

0 commit comments

Comments
 (0)