aboutsummaryrefslogtreecommitdiffstats
path: root/trie/node.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-13 22:05:56 +0800
committerobscuren <geffobscura@gmail.com>2015-02-13 22:05:56 +0800
commita5ea21cd85530eee6eb1bb83c37c20d009f11f74 (patch)
treee5be5bd595139ff7dfbe6261e1e659d8e7dd6f9c /trie/node.go
parentdb24fb792cf0dab91bc85e79aecf6758349002a4 (diff)
parent38faf2c51a1e4a86cda5dfa1b4f7fdae4fd7f58d (diff)
downloaddexon-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar
dexon-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.gz
dexon-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.bz2
dexon-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.lz
dexon-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.xz
dexon-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.tar.zst
dexon-a5ea21cd85530eee6eb1bb83c37c20d009f11f74.zip
merge
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 {