aboutsummaryrefslogtreecommitdiffstats
path: root/ptrie/fullnode.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-24 21:47:50 +0800
committerobscuren <geffobscura@gmail.com>2014-12-24 21:47:50 +0800
commit58d477f7a676563c5237df9c0cfd20ddba5df03c (patch)
treed0ebd9ed08dd75e9613837732a950ac991bd1131 /ptrie/fullnode.go
parent804af9658a89555d6b4069433676acdb6deb9742 (diff)
downloaddexon-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.go5
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