You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As ByteUtil.Hex() already outputs a lower cased hex string, there is no need to "lower" post-checksum. Also, in the case above ToLower() would suffice as hex representation is culture insensitive. 🙄
Also, as a side note, we should be more specific with the method documentation for ByteUtil.Hex() that it specifically outputs a lower cased hex string. 😗
The text was updated successfully, but these errors were encountered:
When converting an
Address
to state key, we convert the givenAddress
to a lower hex string.I've benchmarked the following methods:
Method 1:
Method 2:
As we can see, it is at least 6 times faster. 🙃
As
ByteUtil.Hex()
already outputs a lower cased hex string, there is no need to "lower" post-checksum. Also, in the case aboveToLower()
would suffice as hex representation is culture insensitive. 🙄Also, as a side note, we should be more specific with the method documentation for
ByteUtil.Hex()
that it specifically outputs a lower cased hex string. 😗The text was updated successfully, but these errors were encountered: