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.
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user