eth/catalyst: remove unsafe

This commit is contained in:
Felix Lange 2024-10-17 01:00:24 +02:00
parent ceb8f8ebbc
commit 0195d1a00e

View file

@ -23,7 +23,6 @@ import (
"strconv"
"sync"
"time"
"unsafe"
"github.com/ethereum/go-ethereum/beacon/engine"
"github.com/ethereum/go-ethereum/common"
@ -1262,5 +1261,9 @@ func convertRequests(hex []hexutil.Bytes) [][]byte {
if hex == nil {
return nil
}
return unsafe.Slice((*[]byte)(unsafe.SliceData(hex)), len(hex))
req := make([][]byte, len(hex))
for i := range hex {
req[i] = hex[i]
}
return req
}