core, trie: change format 0x%x to %#x #25221 (#1094)

This commit is contained in:
Daniel Liu 2025-06-17 13:31:20 +08:00 committed by GitHub
parent dabaf392a7
commit 6200e8d7de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -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")
}

View file

@ -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)