diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-24 21:47:50 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-24 21:47:50 +0800 |
commit | 58d477f7a676563c5237df9c0cfd20ddba5df03c (patch) | |
tree | d0ebd9ed08dd75e9613837732a950ac991bd1131 /ptrie/fullnode.go | |
parent | 804af9658a89555d6b4069433676acdb6deb9742 (diff) | |
download | dexon-58d477f7a676563c5237df9c0cfd20ddba5df03c.tar dexon-58d477f7a676563c5237df9c0cfd20ddba5df03c.tar.gz dexon-58d477f7a676563c5237df9c0cfd20ddba5df03c.tar.bz2 dexon-58d477f7a676563c5237df9c0cfd20ddba5df03c.tar.lz dexon-58d477f7a676563c5237df9c0cfd20ddba5df03c.tar.xz dexon-58d477f7a676563c5237df9c0cfd20ddba5df03c.tar.zst dexon-58d477f7a676563c5237df9c0cfd20ddba5df03c.zip |
Fixed a bug where keys where serialised twice
Diffstat (limited to 'ptrie/fullnode.go')
-rw-r--r-- | ptrie/fullnode.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ptrie/fullnode.go b/ptrie/fullnode.go index d6b0745ec..4dd98049d 100644 --- a/ptrie/fullnode.go +++ b/ptrie/fullnode.go @@ -23,7 +23,9 @@ func (self *FullNode) Branches() []Node { func (self *FullNode) Copy() Node { nnode := NewFullNode(self.trie) for i, node := range self.nodes { - nnode.nodes[i] = node + if node != nil { + nnode.nodes[i] = node + } } return nnode @@ -60,7 +62,6 @@ 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 |