Skip to content

Commit

Permalink
fix: change SdkIterlator to parent function call
Browse files Browse the repository at this point in the history
Co-authored-by: Yongwoo Lee <whylee@linecorp.com>
  • Loading branch information
brew0722 and Yongwoo Lee authored Apr 22, 2021
1 parent 0237df4 commit 1f739c5
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions store/prefix/legacy_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,7 @@ func (s LegacyStore) ReverseIterator(start, end []byte) tmdb.Iterator {
}

func (s LegacyStore) SdkIterator(start, end []byte) types.Iterator {
newstart := cloneAppend(s.prefix, start)

var newend []byte
if end == nil {
newend = cpIncr(s.prefix)
} else {
newend = cloneAppend(s.prefix, end)
}

iter := s.parent.Iterator(newstart, newend)

return newPrefixIterator(s.prefix, start, end, iter)
return s.Store.Iterator(start, end)
}

type legacyPrefixIterator struct {
Expand Down

0 comments on commit 1f739c5

Please sign in to comment.