From 98d305f0fb9e6de2e04cf6cc2a4126de57a70bc9 Mon Sep 17 00:00:00 2001 From: Justin Date: Tue, 25 Nov 2025 22:57:19 +0100 Subject: [PATCH] Update types.go --- common/types.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/types.go b/common/types.go index a96d6c7c83..f4d310775a 100644 --- a/common/types.go +++ b/common/types.go @@ -110,7 +110,8 @@ func (h Hash) String() string { // Hash supports the %v, %s, %q, %x, %X and %d format verbs. func (h Hash) Format(s fmt.State, c rune) { hexb := make([]byte, 2+len(h)*2) - copy(hexb, "0x") + hexb[0] = '0' + hexb[1] = 'x' hex.Encode(hexb[2:], h[:]) switch c { @@ -290,7 +291,8 @@ func (a *Address) checksumHex() []byte { func (a Address) hex() []byte { var buf [len(a)*2 + 2]byte - copy(buf[:2], "0x") + buf[0] = '0' + buf[1] = 'x' hex.Encode(buf[2:], a[:]) return buf[:] }