Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez committed Sep 7, 2023
1 parent 60b3f62 commit 6882953
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions store/types/store.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package types

import "io"
import (
"io"

"cosmossdk.io/store/v2"
)

// StoreType defines a type of KVStore.
type StoreType int
Expand All @@ -24,7 +28,19 @@ type KVStore interface {

CacheWrapper

// TODO: Iterator.
// Iterator creates a new Iterator over the domain [start, end). Note:
//
// - Start must be less than end
// - The iterator must be closed by caller
// - To iterate over entire domain, use store.Iterator(nil, nil)
//
// CONTRACT: No writes may happen within a domain while an iterator exists over
// it, with the exception of a branched/cached KVStore.
Iterator(start, end []byte) store.Iterator

// ReverseIterator creates a new reverse Iterator over the domain [start, end).
// It has the some properties and contracts as Iterator.
ReverseIterator(start, end []byte) store.Iterator
}

// CacheWrapper defines an interface for creating a CacheWrap from a KVStore.
Expand Down

0 comments on commit 6882953

Please sign in to comment.