Switched to new trie

This commit is contained in:
obscuren
2014-12-23 18:35:36 +01:00
parent 1054c155db
commit 780abaec98
14 changed files with 105 additions and 73 deletions

View File

@ -1,5 +1,7 @@
package ptrie
import "fmt"
type FullNode struct {
trie *Trie
nodes [17]Node
@ -56,6 +58,11 @@ func (self *FullNode) RlpData() interface{} {
}
func (self *FullNode) set(k byte, value Node) {
if _, ok := value.(*ValueNode); ok && k != 16 {
fmt.Println(value, k)
panic(":(")
}
self.nodes[int(k)] = value
}