aboutsummaryrefslogtreecommitdiffstats
path: root/trie/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/trie.go
parentf958d7d4822d257598ae36fc3b381040faa5bb30 (diff)
downloadgo-tangerine-a13e920af01692cb07a520cda688f1cc5b5469dd.tar
go-tangerine-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.gz
go-tangerine-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.bz2
go-tangerine-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.lz
go-tangerine-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.xz
go-tangerine-a13e920af01692cb07a520cda688f1cc5b5469dd.tar.zst
go-tangerine-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/trie.go')
-rw-r--r--trie/trie.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/trie/trie.go b/trie/trie.go
index e61bd0383..dbffc0ac3 100644
--- a/trie/trie.go
+++ b/trie/trie.go
@@ -126,8 +126,8 @@ func New(root common.Hash, db Database) (*Trie, error) {
}
// Iterator returns an iterator over all mappings in the trie.
-func (t *Trie) Iterator() *Iterator {
- return NewIterator(t)
+func (t *Trie) NodeIterator() NodeIterator {
+ return newNodeIterator(t)
}
// Get returns the value for key stored in the trie.