aboutsummaryrefslogtreecommitdiffstats
path: root/trie/trie_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-04-13 20:41:24 +0800
committerFelix Lange <fjl@twurst.com>2017-04-25 08:14:31 +0800
commit4047ccad2fb73fd2cfd69bf5b8cbfa788871ce0f (patch)
tree702ff4ccb7e70b4f9a063df145a13d2d54ad1292 /trie/trie_test.go
parenta13e920af01692cb07a520cda688f1cc5b5469dd (diff)
downloadgo-tangerine-4047ccad2fb73fd2cfd69bf5b8cbfa788871ce0f.tar
go-tangerine-4047ccad2fb73fd2cfd69bf5b8cbfa788871ce0f.tar.gz
go-tangerine-4047ccad2fb73fd2cfd69bf5b8cbfa788871ce0f.tar.bz2
go-tangerine-4047ccad2fb73fd2cfd69bf5b8cbfa788871ce0f.tar.lz
go-tangerine-4047ccad2fb73fd2cfd69bf5b8cbfa788871ce0f.tar.xz
go-tangerine-4047ccad2fb73fd2cfd69bf5b8cbfa788871ce0f.tar.zst
go-tangerine-4047ccad2fb73fd2cfd69bf5b8cbfa788871ce0f.zip
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.
Diffstat (limited to 'trie/trie_test.go')
-rw-r--r--trie/trie_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/trie/trie_test.go b/trie/trie_test.go
index cacb08824..61adbba0c 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 := NewIterator(tr.NodeIterator())
+ it := NewIterator(tr.NodeIterator(nil))
for it.Next() {
checktr.Update(it.Key, it.Value)
}