mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
fix one panic in tests
This commit is contained in:
parent
9b7bcc3692
commit
6e35fb3b27
2 changed files with 4 additions and 3 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue