From 7c97633746a58166ac8bc49402ba9ee4b2159234 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Tue, 28 Apr 2026 15:28:32 +0200 Subject: [PATCH] panic if size is invalid --- trie/bintrie/trie.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/bintrie/trie.go b/trie/bintrie/trie.go index 5a255ec126..0536b0ba9e 100644 --- a/trie/bintrie/trie.go +++ b/trie/bintrie/trie.go @@ -127,7 +127,7 @@ func (t *BinaryTrie) ToDot() string { // groupDepth specifies the number of levels per serialized group (1-8). func NewBinaryTrie(root common.Hash, db database.NodeDatabase, groupDepth int) (*BinaryTrie, error) { if groupDepth < 1 || groupDepth > MaxGroupDepth { - groupDepth = MaxGroupDepth // Default to 8 + panic("invalid group depth size") } reader, err := trie.NewReader(root, common.Hash{}, db) if err != nil {