mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
eth/catalyst: remove unsafe
This commit is contained in:
parent
ceb8f8ebbc
commit
0195d1a00e
1 changed files with 5 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue