From da548126bab73d71c7ef4efe64c87cd5f2677619 Mon Sep 17 00:00:00 2001 From: Alvarez <140459501+prestoalvarez@users.noreply.github.com> Date: Fri, 31 Oct 2025 13:18:44 +0100 Subject: [PATCH] Update hexutil.go --- common/hexutil/hexutil.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/hexutil/hexutil.go b/common/hexutil/hexutil.go index d6b6b867f2..ae734b180a 100644 --- a/common/hexutil/hexutil.go +++ b/common/hexutil/hexutil.go @@ -60,7 +60,7 @@ func Decode(input string) ([]byte, error) { if len(input) == 0 { return nil, ErrEmptyString } - if !has0xPrefix(input) { + if !Has0xPrefix(input) { return nil, ErrMissingPrefix } b, err := hex.DecodeString(input[2:]) @@ -185,7 +185,7 @@ func EncodeBig(bigint *big.Int) string { } } -func has0xPrefix(input string) bool { +func Has0xPrefix(input string) bool { return len(input) >= 2 && input[0] == '0' && (input[1] == 'x' || input[1] == 'X') } @@ -193,7 +193,7 @@ func checkNumber(input string) (raw string, err error) { if len(input) == 0 { return "", ErrEmptyString } - if !has0xPrefix(input) { + if !Has0xPrefix(input) { return "", ErrMissingPrefix } input = input[2:]