mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
Update types.go
This commit is contained in:
parent
72f3bfd838
commit
1ed3fd3140
1 changed files with 1 additions and 1 deletions
|
|
@ -231,7 +231,7 @@ func HexToAddress(s string) Address { return BytesToAddress(FromHex(s)) }
|
|||
// IsHexAddress verifies whether a string can represent a valid hex-encoded
|
||||
// Ethereum address or not.
|
||||
func IsHexAddress(s string) bool {
|
||||
if has0xPrefix(s) {
|
||||
if hexutil.Has0xPrefix(s) {
|
||||
s = s[2:]
|
||||
}
|
||||
return len(s) == 2*AddressLength && isHex(s)
|
||||
|
|
|
|||
Loading…
Reference in a new issue