From 6200e8d7de3a128773dc1d2dffd487b3dc83e962 Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Tue, 17 Jun 2025 13:31:20 +0800 Subject: [PATCH] core, trie: change format 0x%x to %#x #25221 (#1094) --- core/types/hashing_test.go | 2 +- trie/trie_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/types/hashing_test.go b/core/types/hashing_test.go index 22176a1601..58904b225f 100644 --- a/core/types/hashing_test.go +++ b/core/types/hashing_test.go @@ -180,7 +180,7 @@ func printList(l types.DerivableList) { for i := 0; i < l.Len(); i++ { var buf bytes.Buffer l.EncodeIndex(i, &buf) - fmt.Printf("\"0x%x\",\n", buf.Bytes()) + fmt.Printf("\"%#x\",\n", buf.Bytes()) } fmt.Printf("},\n") } diff --git a/trie/trie_test.go b/trie/trie_test.go index 2a0a3bba71..b9432fb58c 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -367,7 +367,7 @@ func runRandTest(rt randTest) bool { v := tr.Get(step.key) want := values[string(step.key)] if string(v) != want { - rt[i].err = fmt.Errorf("mismatch for key 0x%x, got 0x%x want 0x%x", step.key, v, want) + rt[i].err = fmt.Errorf("mismatch for key %#x, got %#x want %#x", step.key, v, want) } case opCommit: _, rt[i].err = tr.Commit(nil)