Skip to content

Commit

Permalink
beacon/engine: prealloc capacity for map and slice (ethereum#29903)
Browse files Browse the repository at this point in the history
* prealloc capacity for map and slice

* revert unnecessary change
  • Loading branch information
mask-pp authored and stwiname committed Sep 9, 2024
1 parent 5c59ffc commit 3408377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beacon/engine/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func ExecutableDataToBlock(params ExecutableData, versionedHashes []common.Hash,
if params.BaseFeePerGas != nil && (params.BaseFeePerGas.Sign() == -1 || params.BaseFeePerGas.BitLen() > 256) {
return nil, fmt.Errorf("invalid baseFeePerGas: %v", params.BaseFeePerGas)
}
var blobHashes []common.Hash
var blobHashes = make([]common.Hash, 0, len(txs))
for _, tx := range txs {
blobHashes = append(blobHashes, tx.BlobHashes()...)
}
Expand Down

0 comments on commit 3408377

Please sign in to comment.