fix one panic in tests

This commit is contained in:
Guillaume Ballet 2026-04-22 17:47:16 +02:00
parent 9b7bcc3692
commit 6e35fb3b27
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

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

View file

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