Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Nov 21, 2014
1 parent 9b8a12b commit 8cf9ed0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ptrie/trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ptrie
import (
"bytes"
"container/list"
"fmt"
"sync"

"github.com/ethereum/go-ethereum/crypto"
Expand Down Expand Up @@ -198,7 +199,7 @@ func (self *Trie) get(node Node, key []byte) Node {
case *FullNode:
return self.get(node.branch(key[0]), key[1:])
default:
panic("Invalid node")
panic(fmt.Sprintf("%T: invalid node: %v", node, node))
}
}

Expand Down
4 changes: 2 additions & 2 deletions ptrie/trie_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ func TestOutput(t *testing.T) {
for i := 0; i < 50; i++ {
trie.UpdateString(fmt.Sprintf("%s%d", base, i), "valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee")
}
trie.Hash()
fmt.Println("############################## FULL ################################")
fmt.Println(trie.root)

trie.Commit()
fmt.Println("############################## SMALL ################################")
trie2 := New(trie.roothash, trie.cache.backend)
trie2.GetString(base + "20")
fmt.Println("############################## SMALL ################################")
fmt.Println(trie2.root)
}

Expand Down

0 comments on commit 8cf9ed0

Please sign in to comment.