aboutsummaryrefslogtreecommitdiffstats
path: root/trie/iterator.go
diff options
context:
space:
mode:
Diffstat (limited to 'trie/iterator.go')
-rw-r--r--trie/iterator.go15
1 files changed, 4 insertions, 11 deletions
diff --git a/trie/iterator.go b/trie/iterator.go
index dd63a0c5a..fef5b2593 100644
--- a/trie/iterator.go
+++ b/trie/iterator.go
@@ -31,15 +31,8 @@ type Iterator struct {
Value []byte // Current data value on which the iterator is positioned on
}
-// NewIterator creates a new key-value iterator.
-func NewIterator(trie *Trie) *Iterator {
- return &Iterator{
- nodeIt: NewNodeIterator(trie),
- }
-}
-
-// FromNodeIterator creates a new key-value iterator from a node iterator
-func NewIteratorFromNodeIterator(it NodeIterator) *Iterator {
+// NewIterator creates a new key-value iterator from a node iterator
+func NewIterator(it NodeIterator) *Iterator {
return &Iterator{
nodeIt: it,
}
@@ -99,8 +92,8 @@ type nodeIterator struct {
path []byte // Path to the current node
}
-// NewNodeIterator creates an post-order trie iterator.
-func NewNodeIterator(trie *Trie) NodeIterator {
+// newNodeIterator creates an post-order trie iterator.
+func newNodeIterator(trie *Trie) NodeIterator {
if trie.Hash() == emptyState {
return new(nodeIterator)
}