aboutsummaryrefslogtreecommitdiffstats
path: root/trie/secure_trie.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-04-18 19:37:10 +0800
committerFelix Lange <fjl@twurst.com>2017-04-25 08:14:31 +0800
commita13e920af01692cb07a520cda688f1cc5b5469dd (patch)
tree2321214787947ca0b4f302225aa2950617dd5cdd /trie/secure_trie.go
parentf958d7d4822d257598ae36fc3b381040faa5bb30 (diff)
downloaddexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.gz
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.bz2
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.lz
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.xz
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.zst
dexon-a13e920af01692cb07a520cda688f1cc5b5469dd.zip
trie: clean up iterator constructors
Make it so each iterator has exactly one public constructor: - NodeIterators can be created through a method. - Iterators can be created through NewIterator on any NodeIterator.
Diffstat (limited to 'trie/secure_trie.go')
-rw-r--r--trie/secure_trie.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/trie/secure_trie.go b/trie/secure_trie.go
index 113fb6a1a..201716d18 100644
--- a/trie/secure_trie.go
+++ b/trie/secure_trie.go
@@ -156,12 +156,8 @@ func (t *SecureTrie) Root() []byte {
return t.trie.Root()
}
-func (t *SecureTrie) Iterator() *Iterator {
- return t.trie.Iterator()
-}
-
func (t *SecureTrie) NodeIterator() NodeIterator {
- return NewNodeIterator(&t.trie)
+ return t.trie.NodeIterator()
}
// CommitTo writes all nodes and the secure hash pre-images to the given database.