mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46:43 +00:00
signer: using reflect.TypeFor
This commit is contained in:
parent
d4a3bf1b23
commit
0e1b7bd118
1 changed files with 1 additions and 1 deletions
|
|
@ -544,7 +544,7 @@ func parseBytes(encType interface{}) ([]byte, bool) {
|
||||||
// Handle array types.
|
// Handle array types.
|
||||||
val := reflect.ValueOf(encType)
|
val := reflect.ValueOf(encType)
|
||||||
if val.Kind() == reflect.Array && val.Type().Elem().Kind() == reflect.Uint8 {
|
if val.Kind() == reflect.Array && val.Type().Elem().Kind() == reflect.Uint8 {
|
||||||
v := reflect.MakeSlice(reflect.TypeOf([]byte{}), val.Len(), val.Len())
|
v := reflect.MakeSlice(reflect.TypeFor[[]byte](), val.Len(), val.Len())
|
||||||
reflect.Copy(v, val)
|
reflect.Copy(v, val)
|
||||||
return v.Bytes(), true
|
return v.Bytes(), true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue