File tree Expand file tree Collapse file tree 4 files changed +4
-23
lines changed Expand file tree Collapse file tree 4 files changed +4
-23
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ module cosmossdk.io/collections
3
3
go 1.23.2
4
4
5
5
require (
6
- cosmossdk.io/core v1.0.0
7
6
cosmossdk.io/schema v1.0.0
8
7
github.com/cosmos/gogoproto v1.7.0
9
8
github.com/google/go-cmp v0.6.0
Original file line number Diff line number Diff line change 1
- cosmossdk.io/core v1.0.0 h1:e7XBbISOytLBOXMVwpRPixThXqEkeLGlg8no/qpgS8U =
2
- cosmossdk.io/core v1.0.0 /go.mod h1:mKIp3RkoEmtqdEdFHxHwWAULRe+79gfdOvmArrLDbDc =
3
1
cosmossdk.io/schema v1.0.0 h1:/diH4XJjpV1JQwuIozwr+A4uFuuwanFdnw2kKeiXwwQ =
4
2
cosmossdk.io/schema v1.0.0 /go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ =
5
3
github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro =
Original file line number Diff line number Diff line change 8
8
9
9
"github.com/tidwall/btree"
10
10
11
- "cosmossdk.io/core/store "
11
+ store "cosmossdk.io/collections/corecompat "
12
12
)
13
13
14
14
const (
@@ -258,16 +258,14 @@ func (mi *memIterator) assertValid() {
258
258
}
259
259
}
260
260
261
- var _ store.KVStoreWithBatch = (* MemDB )(nil )
262
-
263
261
// MemDB is a simple in-memory key-value store with Batch support.
264
262
type MemDB struct {
265
263
kv MemKV
266
264
mtx sync.RWMutex
267
265
}
268
266
269
267
// NewMemDB creates a new MemDB.
270
- func NewMemDB () store.KVStoreWithBatch {
268
+ func NewMemDB () store.KVStore {
271
269
return & MemDB {kv : NewMemKV ()}
272
270
}
273
271
@@ -339,16 +337,6 @@ func (db *MemDB) Close() error {
339
337
return nil
340
338
}
341
339
342
- // NewBatch returns a new memDBBatch.
343
- func (db * MemDB ) NewBatch () store.Batch {
344
- return newMemDBBatch (db )
345
- }
346
-
347
- // NewBatchWithSize returns a new memDBBatch with the given size.
348
- func (db * MemDB ) NewBatchWithSize (size int ) store.Batch {
349
- return newMemDBBatch (db )
350
- }
351
-
352
340
// memDBBatch operations
353
341
type opType int
354
342
@@ -370,8 +358,6 @@ type memDBBatch struct {
370
358
size int
371
359
}
372
360
373
- var _ store.Batch = (* memDBBatch )(nil )
374
-
375
361
// newMemDBBatch creates a new memDBBatch
376
362
func newMemDBBatch (db * MemDB ) * memDBBatch {
377
363
return & memDBBatch {
Original file line number Diff line number Diff line change @@ -4,12 +4,10 @@ import (
4
4
"context"
5
5
"fmt"
6
6
7
- "cosmossdk.io/core/store"
8
-
9
- "cosmossdk.io/collections/corecompat"
7
+ store "cosmossdk.io/collections/corecompat"
10
8
)
11
9
12
- var _ corecompat .KVStoreService = (* kvStoreService )(nil )
10
+ var _ store .KVStoreService = (* kvStoreService )(nil )
13
11
14
12
func KVStoreService (ctx context.Context , moduleName string ) store.KVStoreService {
15
13
unwrap (ctx ).stores [moduleName ] = NewMemKV ()
You can’t perform that action at this time.
0 commit comments