aboutsummaryrefslogtreecommitdiffstats
path: root/trie/node.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-02-11 18:40:12 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-02-11 18:40:12 +0800
commitcfddb7f3cd3b8cecb1e59412ce4db5769f6c8007 (patch)
treeab28c518bd1b78f6b8ac8b241951ad161cb268a9 /trie/node.go
parent21fd31dad8bc6e0291ca405314b516670333c707 (diff)
parentc6af5f0a275608ea6c797ef826e6090885f24eac (diff)
downloaddexon-cfddb7f3cd3b8cecb1e59412ce4db5769f6c8007.tar
dexon-cfddb7f3cd3b8cecb1e59412ce4db5769f6c8007.tar.gz
dexon-cfddb7f3cd3b8cecb1e59412ce4db5769f6c8007.tar.bz2
dexon-cfddb7f3cd3b8cecb1e59412ce4db5769f6c8007.tar.lz
dexon-cfddb7f3cd3b8cecb1e59412ce4db5769f6c8007.tar.xz
dexon-cfddb7f3cd3b8cecb1e59412ce4db5769f6c8007.tar.zst
dexon-cfddb7f3cd3b8cecb1e59412ce4db5769f6c8007.zip
Merge branch 'develop' into jsonrpc
Conflicts: rpc/ws/server.go
Diffstat (limited to 'trie/node.go')
-rw-r--r--trie/node.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/trie/node.go b/trie/node.go
index a1f68480f..0d8a7cff9 100644
--- a/trie/node.go
+++ b/trie/node.go
@@ -6,7 +6,7 @@ var indices = []string{"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b
type Node interface {
Value() Node
- Copy() Node // All nodes, for now, return them self
+ Copy(*Trie) Node // All nodes, for now, return them self
Dirty() bool
fstring(string) string
Hash() interface{}
@@ -18,7 +18,11 @@ func (self *ValueNode) String() string { return self.fstring("") }
func (self *FullNode) String() string { return self.fstring("") }
func (self *ShortNode) String() string { return self.fstring("") }
func (self *ValueNode) fstring(ind string) string { return fmt.Sprintf("%x ", self.data) }
-func (self *HashNode) fstring(ind string) string { return fmt.Sprintf("%x ", self.key) }
+
+//func (self *HashNode) fstring(ind string) string { return fmt.Sprintf("< %x > ", self.key) }
+func (self *HashNode) fstring(ind string) string {
+ return fmt.Sprintf("%v", self.trie.trans(self))
+}
// Full node
func (self *FullNode) fstring(ind string) string {