mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
revert hexutil.Decode (#665)
Co-authored-by: Jonas Theis <4181434+jonastheis@users.noreply.github.com>
This commit is contained in:
parent
22d9de3d46
commit
127ace6083
1 changed files with 0 additions and 4 deletions
|
|
@ -64,10 +64,6 @@ func Decode(input string) ([]byte, error) {
|
||||||
if !has0xPrefix(input) {
|
if !has0xPrefix(input) {
|
||||||
return nil, ErrMissingPrefix
|
return nil, ErrMissingPrefix
|
||||||
}
|
}
|
||||||
// better compatible with odd size string
|
|
||||||
if len(input)%2 != 0 {
|
|
||||||
input = "0x0" + input[2:]
|
|
||||||
}
|
|
||||||
b, err := hex.DecodeString(input[2:])
|
b, err := hex.DecodeString(input[2:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = mapError(err)
|
err = mapError(err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue