mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-10 17:01:35 +00:00
panic if size is invalid
This commit is contained in:
parent
73b2cde717
commit
7c97633746
1 changed files with 1 additions and 1 deletions
|
|
@ -127,7 +127,7 @@ func (t *BinaryTrie) ToDot() string {
|
||||||
// groupDepth specifies the number of levels per serialized group (1-8).
|
// groupDepth specifies the number of levels per serialized group (1-8).
|
||||||
func NewBinaryTrie(root common.Hash, db database.NodeDatabase, groupDepth int) (*BinaryTrie, error) {
|
func NewBinaryTrie(root common.Hash, db database.NodeDatabase, groupDepth int) (*BinaryTrie, error) {
|
||||||
if groupDepth < 1 || groupDepth > MaxGroupDepth {
|
if groupDepth < 1 || groupDepth > MaxGroupDepth {
|
||||||
groupDepth = MaxGroupDepth // Default to 8
|
panic("invalid group depth size")
|
||||||
}
|
}
|
||||||
reader, err := trie.NewReader(root, common.Hash{}, db)
|
reader, err := trie.NewReader(root, common.Hash{}, db)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue