diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-03 11:58:34 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-03 11:58:34 +0800 |
commit | 3c7181d28f1f24aaea2da5cce664ffac52f369df (patch) | |
tree | 36e229ec95e89287e6d1add6ab587a90f8960041 /trie/fullnode.go | |
parent | 6fecb150d6f2bb36d3f1b7b9095cac428df2ce5a (diff) | |
download | go-tangerine-3c7181d28f1f24aaea2da5cce664ffac52f369df.tar go-tangerine-3c7181d28f1f24aaea2da5cce664ffac52f369df.tar.gz go-tangerine-3c7181d28f1f24aaea2da5cce664ffac52f369df.tar.bz2 go-tangerine-3c7181d28f1f24aaea2da5cce664ffac52f369df.tar.lz go-tangerine-3c7181d28f1f24aaea2da5cce664ffac52f369df.tar.xz go-tangerine-3c7181d28f1f24aaea2da5cce664ffac52f369df.tar.zst go-tangerine-3c7181d28f1f24aaea2da5cce664ffac52f369df.zip |
Fixed a copy issue in the trie which could cause a consensus failure
Diffstat (limited to 'trie/fullnode.go')
-rw-r--r-- | trie/fullnode.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/trie/fullnode.go b/trie/fullnode.go index ebbe7f384..522fdb373 100644 --- a/trie/fullnode.go +++ b/trie/fullnode.go @@ -20,11 +20,11 @@ func (self *FullNode) Branches() []Node { return self.nodes[:16] } -func (self *FullNode) Copy() Node { - nnode := NewFullNode(self.trie) +func (self *FullNode) Copy(t *Trie) Node { + nnode := NewFullNode(t) for i, node := range self.nodes { if node != nil { - nnode.nodes[i] = node + nnode.nodes[i] = node.Copy(t) } } |