Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com> Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
co-authored by
cool-developer
Julien Robert
parent
64beb97259
commit
150d17c3fc
@@ -4,11 +4,11 @@ import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
db "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
"cosmossdk.io/core/store"
|
||||
coretesting "cosmossdk.io/core/testing"
|
||||
)
|
||||
|
||||
func TestCollectionPagination(t *testing.T) {
|
||||
@@ -163,7 +163,7 @@ func TestCollectionPagination(t *testing.T) {
|
||||
}
|
||||
|
||||
type testStore struct {
|
||||
db db.DB
|
||||
db store.KVStoreWithBatch
|
||||
}
|
||||
|
||||
func (t testStore) OpenKVStore(ctx context.Context) store.KVStore {
|
||||
@@ -197,6 +197,6 @@ func (t testStore) ReverseIterator(start, end []byte) (store.Iterator, error) {
|
||||
var _ store.KVStore = testStore{}
|
||||
|
||||
func deps() (store.KVStoreService, context.Context) {
|
||||
kv := db.NewMemDB()
|
||||
kv := coretesting.NewMemDB()
|
||||
return &testStore{kv}, context.Background()
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
db "github.com/cosmos/cosmos-db"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
corestore "cosmossdk.io/core/store"
|
||||
"cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
@@ -126,7 +126,7 @@ func Paginate(
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func getIterator(prefixStore types.KVStore, start []byte, reverse bool) db.Iterator {
|
||||
func getIterator(prefixStore types.KVStore, start []byte, reverse bool) corestore.Iterator {
|
||||
if reverse {
|
||||
var end []byte
|
||||
if start != nil {
|
||||
|
||||
Reference in New Issue
Block a user