forked from cosmos/iavl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove cosmos-db as a dep (cosmos#955)
- Loading branch information
1 parent
fcc7eb7
commit e063edd
Showing
38 changed files
with
973 additions
and
861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package main | ||
|
||
import ( | ||
corestore "cosmossdk.io/core/store" | ||
dbm "github.com/cosmos/cosmos-db" | ||
) | ||
|
||
// Wrapper wraps a dbm.DB to implement DB. | ||
type Wrapper struct { | ||
dbm.DB | ||
} | ||
|
||
// newWrapper returns a new Wrapper. | ||
// Wrapper must be implemented against rocksdb.DB and pebbleDB separately | ||
func newWrapper(db dbm.DB) *Wrapper { | ||
return &Wrapper{DB: db} | ||
} | ||
|
||
// Iterator implements DB. | ||
func (db *Wrapper) Iterator(start, end []byte) (corestore.Iterator, error) { | ||
return db.DB.Iterator(start, end) | ||
} | ||
|
||
// ReverseIterator implements DB. | ||
func (db *Wrapper) ReverseIterator(start, end []byte) (corestore.Iterator, error) { | ||
return db.DB.ReverseIterator(start, end) | ||
} | ||
|
||
// NewBatch implements DB. | ||
func (db *Wrapper) NewBatch() corestore.Batch { | ||
return db.DB.NewBatch() | ||
} | ||
|
||
// NewBatchWithSize implements DB. | ||
func (db *Wrapper) NewBatchWithSize(size int) corestore.Batch { | ||
return db.DB.NewBatchWithSize(size) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.