diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-24 01:35:36 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-24 01:35:36 +0800 |
commit | 780abaec988df302e0c98f1a35e9af35b5623746 (patch) | |
tree | dfd26765ec08d3df756730bb186639edb388b4ee /ptrie/fullnode.go | |
parent | 1054c155db8ac59b97b81fa7a7a20f2239eb1e82 (diff) | |
download | dexon-780abaec988df302e0c98f1a35e9af35b5623746.tar dexon-780abaec988df302e0c98f1a35e9af35b5623746.tar.gz dexon-780abaec988df302e0c98f1a35e9af35b5623746.tar.bz2 dexon-780abaec988df302e0c98f1a35e9af35b5623746.tar.lz dexon-780abaec988df302e0c98f1a35e9af35b5623746.tar.xz dexon-780abaec988df302e0c98f1a35e9af35b5623746.tar.zst dexon-780abaec988df302e0c98f1a35e9af35b5623746.zip |
Switched to new trie
Diffstat (limited to 'ptrie/fullnode.go')
-rw-r--r-- | ptrie/fullnode.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ptrie/fullnode.go b/ptrie/fullnode.go index 7a7f7d22d..d6b0745ec 100644 --- a/ptrie/fullnode.go +++ b/ptrie/fullnode.go @@ -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 } |