aboutsummaryrefslogtreecommitdiffstats
path: root/trie/iterator.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-08 00:03:22 +0800
committerobscuren <geffobscura@gmail.com>2015-02-08 00:03:22 +0800
commit99ebb869bf15e04db7b000fde2894387f2927bb6 (patch)
treed9c426542f0f6aa8c45eeedde5f8eaef4fbceb28 /trie/iterator.go
parent44eafb15e0581ef37c3e3cfeccb703381acc2ae2 (diff)
downloaddexon-99ebb869bf15e04db7b000fde2894387f2927bb6.tar
dexon-99ebb869bf15e04db7b000fde2894387f2927bb6.tar.gz
dexon-99ebb869bf15e04db7b000fde2894387f2927bb6.tar.bz2
dexon-99ebb869bf15e04db7b000fde2894387f2927bb6.tar.lz
dexon-99ebb869bf15e04db7b000fde2894387f2927bb6.tar.xz
dexon-99ebb869bf15e04db7b000fde2894387f2927bb6.tar.zst
dexon-99ebb869bf15e04db7b000fde2894387f2927bb6.zip
Fixed iterator
Diffstat (limited to 'trie/iterator.go')
-rw-r--r--trie/iterator.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/trie/iterator.go b/trie/iterator.go
index f0dae28bb..3b3ddd751 100644
--- a/trie/iterator.go
+++ b/trie/iterator.go
@@ -23,7 +23,6 @@ func (self *Iterator) Next() bool {
self.Key = []byte(DecodeCompact(k))
return len(k) > 0
-
}
func (self *Iterator) next(node Node, key []byte) []byte {
@@ -67,7 +66,7 @@ func (self *Iterator) next(node Node, key []byte) []byte {
if BeginsWith(key, k) {
ret = self.next(cnode, skey)
} else if bytes.Compare(k, key[:len(k)]) > 0 {
- ret = self.key(node)
+ return self.key(node)
}
if ret != nil {