From 4b1df3145bc94651ed9bb1d72ccf4d811e1c6fab Mon Sep 17 00:00:00 2001 From: 0xFloki Date: Sun, 21 Dec 2025 19:28:42 +0100 Subject: [PATCH] Update encoding_test.go --- trie/encoding_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/encoding_test.go b/trie/encoding_test.go index ac50b5d025..20cc250d95 100644 --- a/trie/encoding_test.go +++ b/trie/encoding_test.go @@ -99,7 +99,7 @@ func TestHexToCompactInPlaceRandom(t *testing.T) { key := make([]byte, l) crand.Read(key) hexBytes := keybytesToHex(key) - hexOrig := []byte(string(hexBytes)) + hexOrig := append([]byte(nil), hexBytes...) // copy without extra string alloc exp := hexToCompact(hexBytes) got := hexToCompactInPlace(hexBytes)