mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Remove unsafe
This commit is contained in:
parent
f01340f205
commit
1638bd3d05
1 changed files with 4 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ package types
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"unsafe"
|
||||
"reflect"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
|
|
@ -43,8 +43,10 @@ type withdrawalMarshaling struct {
|
|||
Amount hexutil.Uint64
|
||||
}
|
||||
|
||||
var withdrawalSize = common.StorageSize(reflect.TypeOf(Withdrawal{}).Size())
|
||||
|
||||
func (w Withdrawal) Size() common.StorageSize {
|
||||
return common.StorageSize(unsafe.Sizeof(w))
|
||||
return common.StorageSize(withdrawalSize)
|
||||
}
|
||||
|
||||
// Withdrawals implements DerivableList for withdrawals.
|
||||
|
|
|
|||
Loading…
Reference in a new issue