From 6e35fb3b2702b0b63df1a9ad1e1b102344b32f25 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Wed, 22 Apr 2026 17:47:16 +0200 Subject: [PATCH] fix one panic in tests --- trie/bintrie/store_commit.go | 2 +- trie/bintrie/trie_test.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/trie/bintrie/store_commit.go b/trie/bintrie/store_commit.go index 2d1b3b05b5..76e9fb365b 100644 --- a/trie/bintrie/store_commit.go +++ b/trie/bintrie/store_commit.go @@ -232,7 +232,7 @@ func (s *nodeStore) decodeNode(serialized []byte, depth int, hn common.Hash, mus // clean root means the whole subtree is clean. func (s *nodeStore) collectNodes(ref nodeRef, path []byte, flushfn nodeFlushFn, groupDepth int) error { if groupDepth < 1 || groupDepth > MaxGroupDepth { - return errors.New("groupDepth must be between 1 and 8") + return fmt.Errorf("groupDepth %d, must be between 1 and 8", groupDepth) } switch ref.Kind() { diff --git a/trie/bintrie/trie_test.go b/trie/bintrie/trie_test.go index 73aacb76c4..8b7d9e46d6 100644 --- a/trie/bintrie/trie_test.go +++ b/trie/bintrie/trie_test.go @@ -768,8 +768,9 @@ func TestGetStorageNonMembershipInternalRoot(t *testing.T) { // flushes only the root-to-leaf path. func TestCommitSkipCleanSubtrees(t *testing.T) { tr := &BinaryTrie{ - store: newNodeStore(), - tracer: trie.NewPrevalueTracer(), + store: newNodeStore(), + tracer: trie.NewPrevalueTracer(), + groupDepth: 1, } const n = 200 key := func(i int) [HashSize]byte {