From 127ace6083d9de55b2e3564a596903bfeb3962d8 Mon Sep 17 00:00:00 2001 From: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Date: Tue, 23 Jul 2024 11:06:24 +0800 Subject: [PATCH] revert `hexutil.Decode` (#665) Co-authored-by: Jonas Theis <4181434+jonastheis@users.noreply.github.com> --- common/hexutil/hexutil.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/common/hexutil/hexutil.go b/common/hexutil/hexutil.go index 924f7d2513..d3201850a8 100644 --- a/common/hexutil/hexutil.go +++ b/common/hexutil/hexutil.go @@ -64,10 +64,6 @@ func Decode(input string) ([]byte, error) { if !has0xPrefix(input) { return nil, ErrMissingPrefix } - // better compatible with odd size string - if len(input)%2 != 0 { - input = "0x0" + input[2:] - } b, err := hex.DecodeString(input[2:]) if err != nil { err = mapError(err)