From 4ebef16b7a39c9194932f192c2092e70bed0c808 Mon Sep 17 00:00:00 2001 From: lupin17 <59-quanta.middle@icloud.com> Date: Tue, 13 Jan 2026 21:42:44 +0100 Subject: [PATCH] Update bytes.go --- common/bytes.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/bytes.go b/common/bytes.go index d1f5c6c995..de59f5ae38 100644 --- a/common/bytes.go +++ b/common/bytes.go @@ -38,13 +38,7 @@ func FromHex(s string) []byte { // CopyBytes returns an exact copy of the provided bytes. func CopyBytes(b []byte) (copiedBytes []byte) { - if b == nil { - return nil - } - copiedBytes = make([]byte, len(b)) - copy(copiedBytes, b) - - return + return bytes.Clone(b) } // has0xPrefix validates str begins with '0x' or '0X'.