trie: add start key to NodeIterator constructors
The 'step' method is split into two parts, 'peek' and 'push'. peek returns the next state but doesn't make it current. The end of iteration was previously tracked by setting 'trie' to nil. End of iteration is now tracked using the 'iteratorEnd' error, which is slightly cleaner and requires less code.
Showing
- core/state/dump.go 2 additions, 2 deletionscore/state/dump.go
- core/state/iterator.go 2 additions, 2 deletionscore/state/iterator.go
- core/state/statedb.go 1 addition, 1 deletioncore/state/statedb.go
- trie/iterator.go 76 additions, 51 deletionstrie/iterator.go
- trie/iterator_test.go 55 additions, 10 deletionstrie/iterator_test.go
- trie/secure_trie.go 4 additions, 2 deletionstrie/secure_trie.go
- trie/sync_test.go 1 addition, 1 deletiontrie/sync_test.go
- trie/trie.go 4 additions, 3 deletionstrie/trie.go
- trie/trie_test.go 1 addition, 1 deletiontrie/trie_test.go
Loading
Please register or sign in to comment