From a13e920af01692cb07a520cda688f1cc5b5469dd Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 18 Apr 2017 13:37:10 +0200 Subject: 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. --- trie/trie_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'trie/trie_test.go') diff --git a/trie/trie_test.go b/trie/trie_test.go index 01ae3a4e7..cacb08824 100644 --- a/trie/trie_test.go +++ b/trie/trie_test.go @@ -439,7 +439,7 @@ func runRandTest(rt randTest) bool { tr = newtr case opItercheckhash: checktr, _ := New(common.Hash{}, nil) - it := tr.Iterator() + it := NewIterator(tr.NodeIterator()) for it.Next() { checktr.Update(it.Key, it.Value) } -- cgit v1.2.3