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:
@ -80,7 +80,7 @@ func checkTrieConsistency(db Database, root common.Hash) error {
|
||||
if err != nil {
|
||||
return nil // // Consider a non existent state consistent
|
||||
}
|
||||
it := NewNodeIterator(trie)
|
||||
it := trie.NodeIterator()
|
||||
for it.Next(true) {
|
||||
}
|
||||
return it.Error()
|
||||
|
Reference in New Issue
Block a user