aboutsummaryrefslogtreecommitdiffstats
path: root/ptrie/fullnode.go
diff options
context:
space:
mode:
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